Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, alibaba), 1,184 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
another question about ent_create #128918
05/09/07 17:21
05/09/07 17:21
Joined: Nov 2005
Posts: 1,007
jigalypuff Offline OP
Serious User
jigalypuff  Offline OP
Serious User

Joined: Nov 2005
Posts: 1,007
i have looked through the aums for an example of what i am after but can`t find anything. i want to change between two models in game, one is the ship itself

the other is the bridge of the ship

i have a camera code set for 3 views one of which is an fps view (which will be the bridge view) could anyone point me in the right direction for something like this?
the camera to go into fps is actived by 2 btw. i hope i`ve explained this ok


Why does everyone like dolphins? Never trust a species which smiles all the time!
Re: another question about ent_create [Re: jigalypuff] #128919
05/09/07 17:32
05/09/07 17:32
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
If you want to change a model to another model, use ent_morph

Re: another question about ent_create [Re: Claus_N] #128920
05/09/07 17:43
05/09/07 17:43
Joined: Nov 2005
Posts: 1,007
jigalypuff Offline OP
Serious User
jigalypuff  Offline OP
Serious User

Joined: Nov 2005
Posts: 1,007
cool i`ll give that a try and hopefully not have to keep bothering you lol, thanks.


Why does everyone like dolphins? Never trust a species which smiles all the time!
Re: another question about ent_create [Re: jigalypuff] #128921
05/09/07 18:58
05/09/07 18:58
Joined: Nov 2005
Posts: 1,007
jigalypuff Offline OP
Serious User
jigalypuff  Offline OP
Serious User

Joined: Nov 2005
Posts: 1,007
well i have failed miserably, i found two examples of ent_morph in the aums, unfortunatly it is for explosions and not quite what i need, so i tried this
Code:

function ship_camera()
{
if (key_1 == on) {camera_number = 1;}
if (key_2 == on) {camera_number = 2;}
if (key_3 == on) {camera_number = 3;}
if (camera_number == 1) // top view
{
camera.x = player.x;
camera.y = player.y;
camera.z = player.z + 900; // play with this value
camera.pan = player.pan;
camera.tilt = -90;
}
if (camera_number == 2) // simulated first person view (that's just another isometric view, really)
{
camera.x = player.x -40 * cos(player.pan);
camera.y = player.y - 0 * sin(player.pan);
camera.z = player.z + 0;
camera.pan = player.pan;
camera.tilt = 0;
}
ent_morph(my,bridge_mdl);

if (camera_number == 3) // true isometric view
{
camera.x = player.x - 200 * cos(player.pan); // 200 = distance
camera.y = player.y - 200 * sin(player.pan); // same value here
camera.z = player.z + 150; // above the player
camera.pan = player.pan;
camera.tilt = -27; // look down at the player
}
wait (1);
}


what i hoped for here was when 2 was pressed then the bridge mesh would appear and the ship mesh would be gone, however as soon as i launch the code the bridge mesh is there straight away even though the camera is set to 1 for the start. cheers for any and all help.


Why does everyone like dolphins? Never trust a species which smiles all the time!
Re: another question about ent_create [Re: jigalypuff] #128922
05/09/07 19:32
05/09/07 19:32
Joined: Dec 2005
Posts: 252
MyOwnKingdom
nipx Offline
Member
nipx  Offline
Member

Joined: Dec 2005
Posts: 252
MyOwnKingdom
Code:
function ship_camera()
{
if (key_1 == on) {camera_number = 1;}
if (key_2 == on) {camera_number = 2;ent_morph(my,bridge_mdl); }
if (key_3 == on) {camera_number = 3;}
if (camera_number == 1) // top view
{
camera.x = player.x;
camera.y = player.y;
camera.z = player.z + 900; // play with this value
camera.pan = player.pan;
camera.tilt = -90;
}
if (camera_number == 2) // simulated first person view (that's just another isometric view, really)
{
camera.x = player.x -40 * cos(player.pan);
camera.y = player.y - 0 * sin(player.pan);
camera.z = player.z + 0;
camera.pan = player.pan;
camera.tilt = 0;
}


if (camera_number == 3) // true isometric view
{
camera.x = player.x - 200 * cos(player.pan); // 200 = distance
camera.y = player.y - 200 * sin(player.pan); // same value here
camera.z = player.z + 150; // above the player
camera.pan = player.pan;
camera.tilt = -27; // look down at the player
}
wait (1);
}




ent_morph doesnt just change the meshs, it changes the whole model.


dont know if this is what you are looking for but there you placed it, its propably wrong...

Re: another question about ent_create [Re: nipx] #128923
05/09/07 19:47
05/09/07 19:47
Joined: Nov 2005
Posts: 1,007
jigalypuff Offline OP
Serious User
jigalypuff  Offline OP
Serious User

Joined: Nov 2005
Posts: 1,007
woohoo, that works perfectly mate thanks guys.


Why does everyone like dolphins? Never trust a species which smiles all the time!

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1