Gamestudio Links
Zorro Links
Newest Posts
Future of ZorroHFT
by TipmyPip. 11/16/25 13:52
COT Download with Quandl does not work
by Petra. 11/15/25 09:35
Training with the R bridge does not work
by Petra. 11/15/25 09:31
Zorro 2.70
by jcl. 11/15/25 08:43
Camera always moves upwards?
by NeoDumont. 11/14/25 16:32
brokerCommand PLOT_HLINE parameters
by M_D. 11/13/25 10:42
ZorroGPT
by TipmyPip. 11/10/25 11:04
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (TipmyPip, Grant, Ayumi, ozgur, Quad), 7,400 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
tritom, sheliepaley, Blueguy, blobplayintennis, someone2
19178 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Player's Character Walk automaticly? #207297
05/19/08 00:45
05/19/08 00:45
Joined: Aug 2006
Posts: 49
J
Jourdan Offline OP
Newbie
Jourdan  Offline OP
Newbie
J

Joined: Aug 2006
Posts: 49
How do I make Player's Character walk/move without the player have to click a key?

thanks in advance

Re: Player's Character Walk automaticly? [Re: Jourdan] #207378
05/19/08 11:28
05/19/08 11:28
Joined: Aug 2006
Posts: 652
Netherlands
bstudio Offline
User
bstudio  Offline
User

Joined: Aug 2006
Posts: 652
Netherlands
Create a path in your world and let him walk that path smile


BASIC programmers never die, they GOSUB and don't RETURN.
Re: Player's Character Walk automaticly? [Re: bstudio] #208756
05/29/08 11:31
05/29/08 11:31
Joined: Aug 2006
Posts: 49
J
Jourdan Offline OP
Newbie
Jourdan  Offline OP
Newbie
J

Joined: Aug 2006
Posts: 49
how do I make it walk through path?

Re: Player's Character Walk automaticly? [Re: Jourdan] #209828
06/06/08 01:13
06/06/08 01:13
Joined: Jul 2006
Posts: 28
B
burning_devil Offline
Newbie
burning_devil  Offline
Newbie
B

Joined: Jul 2006
Posts: 28
Here is an example code, I use for my wrestler intro in my game.
Assign this action to your player.

var player_distance;//make a varible for how fast the player walks
action Auto_Walk//Give this action to your player
{

while(1) // use this to update your movement, without it, he will not move
{

player_distance.x = 2 * time; //Assign how fast he will walk, by replacing 2
player_distance.y = 0 * time; //Assign how fast he will walk, by replacing 0
player_distance.z = 0 * time;//Assign how fast he will walk, by replacing 0
ent_move(player_distance, nullvector);//ent_move is the instruction to make him move foward
MY.animationframe+= 8 * time;//how fast the walk animation will be
ent_animate(my,"walk",MY.animationframe,ANM_CYCLE);//this plays the walk anim

wait(1); //always us this wait instruction after while(), to avoid errors

}



}

Last edited by burning_devil; 06/06/08 01:15.
Re: Player's Character Walk automaticly? [Re: burning_devil] #211504
06/17/08 00:22
06/17/08 00:22
Joined: Jun 2008
Posts: 5
TX, USA
K
kurg Offline
Newbie
kurg  Offline
Newbie
K

Joined: Jun 2008
Posts: 5
TX, USA
The above code gives an error.

It says 'x' is not a member of 'function'

Should I define player_distance to be a vector?

Re: Player's Character Walk automaticly? [Re: kurg] #211506
06/17/08 00:49
06/17/08 00:49
Joined: Jun 2008
Posts: 5
TX, USA
K
kurg Offline
Newbie
kurg  Offline
Newbie
K

Joined: Jun 2008
Posts: 5
TX, USA
I modified it. It works now. The player_distance variable needed its x, y, z parameters to be defined by vec_set().

Thanks for the code Burning Devil. smile
I hope you don't mind me using it in my game.


var player_distance;//make a varible for how fast the player walks
action Auto_Walk//Give this action to your player
{
while(1) // use this to update your movement, without it, he will not move
{
vec_set(player_distance, vector(2,4, 0));//Assign how fast he will walk, by replacing 0
ent_move(player_distance, nullvector);//ent_move is the instruction to make him move foward
MY.animationframe+= 8 * time;//how fast the walk animation will be
ent_animate(my,"walk",MY.animationframe,ANM_CYCLE);//this plays the walk anim
wait(1); //always us this wait instruction after while(), to avoid errors
}
}



Moderated by  HeelX, Spirit 

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