Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 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
climbing up in stairs #319466
04/15/10 06:49
04/15/10 06:49
Joined: Mar 2010
Posts: 17
K
Kiko Offline OP
Warez kiddie
Kiko  Offline OP
Warez kiddie
K

Joined: Mar 2010
Posts: 17
hi,

please help me on how to code a character when climbing up the stairs...

thanks

Re: climbing up in stairs [Re: Kiko] #319470
04/15/10 07:55
04/15/10 07:55

C
chris_oat
Unregistered
chris_oat
Unregistered
C



GS Pro 7.07 ?!

Re: climbing up in stairs [Re: ] #319496
04/15/10 12:19
04/15/10 12:19
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
It is a WAREZ Version!!

Re: climbing up in stairs [Re: Widi] #319774
04/17/10 16:30
04/17/10 16:30
Joined: Dec 2009
Posts: 74
Romania,Bucharest
Ted22 Offline
Junior Member
Ted22  Offline
Junior Member

Joined: Dec 2009
Posts: 74
Romania,Bucharest
Hello mate.I got the same problem but i managed to solve it.Here's my script:
///////////////////////////////
#include <acknex.h>
#include <default.c>

///////////////////////////////

var walk_percentage;
var run_percentage;
var walk_percentage2;
var death_percentage;
var guard_rotate;
ENTITY* stair;
var stand_percentage;
ANGLE* guard;
ENTITY* guard;
ENTITY* blocks;

function main()
{
video_mode = 7;
level_load ("work21.wmb");
wait (2); // wait until the level is loaded
}


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; //this is the most important part
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, -35 * time_step), nullvector, 0); //this is the gravity
if (key_any == 1)
c_move (my, vector(0 , 0, -35 * time_step), nullvector, 0); //this is the gravity
wait(1);
}
}

////Sorry,there are some things that are not about climbing the stairs.For the things that u don't know,look on reference manual.Please tell me if it helped

Last edited by Ted22; 04/18/10 04:58.

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