Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,484 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Dang it. #250815
02/10/09 00:21
02/10/09 00:21
Joined: Sep 2008
Posts: 68
T
Tai Offline OP
Junior Member
Tai  Offline OP
Junior Member
T

Joined: Sep 2008
Posts: 68
Quote:
action player_action()
{
c_setminmax(my);
my.min_z += 4;
ent_gravity = 1.6;
player = my; // I'm the player
set (my, INVISIBLE); // no need to see player's model in 1st person mode
while (1)
{
handle_player_movement();
vec_set (camera.x, player.x); // use player's x and y for the camera as well
camera.z += 30; // place the camera 30 quants above the player on the z axis (approximate eye level)
camera.pan -= 5 * mouse_force.x; // rotate the camera around by moving the mouse
camera.tilt += 5 * mouse_force.y; // on its x and y axis
player.pan = camera.pan; // the camera and the player have the same pan angle
wait(1);
}
}


Gives a Error E1513: Crash in player_action.
Ugh.

Re: Dang it. [Re: Tai] #250828
02/10/09 03:06
02/10/09 03:06
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
try...

Code:
action player_action() 
{
player = me; // I'm the player
wait(1);
c_setminmax(me);
me.min_z += 4;
ent_gravity = 1.6;
set (me, INVISIBLE); // no need to see player's model in 1st person mode
while (1) 
{
handle_player_movement();
vec_set (camera.x, player.x); // use player's x and y for the camera as well
camera.z += 30; // place the camera 30 quants above the player on the z axis (approximate eye level)
camera.pan -= 5 * mouse_force.x; // rotate the camera around by moving the mouse
camera.tilt += 5 * mouse_force.y; // on its x and y axis
player.pan = camera.pan; // the camera and the player have the same pan angle
wait(1);
}
}


1) I would set the pointer at the beginning of the action.
2 c_setminmax should be changed at least 1 frame after the object creation.
3) me and my are the same, i just prefer me LOL.

Re: Dang it. [Re: DJBMASTER] #250836
02/10/09 05:26
02/10/09 05:26
Joined: Sep 2008
Posts: 68
T
Tai Offline OP
Junior Member
Tai  Offline OP
Junior Member
T

Joined: Sep 2008
Posts: 68
It appears the problem is within the pointer function. I'll take a look at it.

Re: Dang it. [Re: Tai] #250838
02/10/09 06:24
02/10/09 06:24
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Yeah, the templates use the "player" pointer rather than just "me"


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

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

Gamestudio download | 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