Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (fairtrader, Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn), 581 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 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 | 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