Gamestudio Links
Zorro Links
Newest Posts
FXCM demo test failed
by qin. 01/13/26 11:16
Camera always moves upwards?
by NeoDumont. 01/12/26 09:39
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (qin, 1 invisible), 4,305 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
promfast, joe_kane, Namitha_NN, Syndrela, agasior
19190 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Walking on the stairs #303781
01/02/10 00:23
01/02/10 00:23
Joined: Dec 2009
Posts: 74
Romania,Bucharest
Ted22 Offline OP
Junior Member
Ted22  Offline OP
Junior Member

Joined: Dec 2009
Posts: 74
Romania,Bucharest
Hello!I got a problem...I try to make my character walking up the stairs but only on the stairs,so if it meets a mountain or something like it just can't climb it...Can anyone help?
Thanks in advance!

Re: Walking on the stairs [Re: Ted22] #303804
01/02/10 12:05
01/02/10 12:05
Joined: Dec 2009
Posts: 74
Romania,Bucharest
Ted22 Offline OP
Junior Member
Ted22  Offline OP
Junior Member

Joined: Dec 2009
Posts: 74
Romania,Bucharest
i have used move_min_z = 0.4; and now my character walks up to the stairs but now i got another problem...as i want to go down my character starts walking forward in the air...how can i fix that?

Re: Walking on the stairs [Re: Ted22] #303806
01/02/10 12:17
01/02/10 12:17
Joined: Dec 2009
Posts: 74
Romania,Bucharest
Ted22 Offline OP
Junior Member
Ted22  Offline OP
Junior Member

Joined: Dec 2009
Posts: 74
Romania,Bucharest
and as i set something like gravity,it wont climb the stairs so i need to tell the engine if my character doesen't colides with anything it falls.How can i do that?

Last edited by Ted22; 01/02/10 13:24.
Re: Walking on the stairs [Re: Ted22] #303828
01/02/10 17:42
01/02/10 17:42
Joined: Dec 2009
Posts: 74
Romania,Bucharest
Ted22 Offline OP
Junior Member
Ted22  Offline OP
Junior Member

Joined: Dec 2009
Posts: 74
Romania,Bucharest
Ok after a long thinking i managed to do it...it looks like this:
action walking_guard()
{
c_setminmax(my);
guard = me;
while (1)
{
set(me,FAT);
set(me,NARROW);
player = me;
camera.x = player.x - 100 * cos(player.pan);
camera.y = player.y - 100 * sin(player.pan);
camera.pan = player.pan; // the camera and the player have the same pan angle
camera.z = player.z + 70; // place the camera above the player, play with this value
camera.tilt = -25;
if (key_w)
ent_animate(my,"walk",walk_percentage, ANM_CYCLE); // "walk" animation loop
walk_percentage += 3 * time_step; // 3 = animation speed for "walk"
if (key_w)
c_move (my, vector(3.5 * time_step, 0, 0), nullvector, GLIDE);
if (key_w)
move_min_z = 0.4 * time_step * 60;
if (key_s)
ent_animate(my,"walk",walk_percentage2, ANM_CYCLE); // "walk" animation loop
walk_percentage2 += 3 * time_step; // 3 = animation speed for "walk"
if (key_s)
c_move (my, vector(-2 * time_step, 0, 0), nullvector, GLIDE);
if (key_a) me.pan += 5 * time_step;
if (key_d) me.pan -=5 * time_step;
if (key_w && key_shiftl)
ent_animate(my,"run",run_percentage, ANM_CYCLE); // "walk" animation loop
run_percentage += 7 * time_step; // 3 = animation speed for "walk"
if (key_d && key_w)
ent_animate(my,"walk",walk_percentage, ANM_CYCLE); // "walk" animation loop
walk_percentage += 0 * time_step; // 3 = animation speed for "walk"
if (key_a && key_w)
ent_animate(my,"walk",walk_percentage, ANM_CYCLE); // "walk" animation loop
walk_percentage += 0 * time_step; // 3 = animation speed for "walk"
if (key_shiftl && key_w)
c_move (my, vector(7 * time_step, 0, 0), nullvector, GLIDE);
if (key_shiftl && key_w && key_d)
ent_animate(my,"run",run_percentage, ANM_CYCLE); // "walk" animation loop
run_percentage += 0 * time_step; // 3 = animation speed for "walk"
if (key_shiftl && key_w && key_a)
ent_animate(my,"run",run_percentage, ANM_CYCLE); // "walk" animation loop
run_percentage += 0 * time_step; // 3 = animation speed for "walk"
if (key_any == 0)
ent_animate(my,"stand",stand_percentage, ANM_CYCLE); // "walk" animation loop
stand_percentage += 4 * time_step; // 3 = animation speed for "walk"
if (key_any == 0)
c_move (my, vector(0 , 0, -25 * time_step), nullvector, 0);
if (key_any == 1)
c_move (my, vector(0 , 0, -35 * time_step), nullvector, 0);
wait(1);
}
}


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