FPS Tutorial, Ent_move not moving

Posted By: MattyTheG

FPS Tutorial, Ent_move not moving - 07/06/07 15:58

Hello everyone, I'm pretty new to Game studio and I downloaded the FPS shooter tutorial that I found somewhere I followed the code exactly as far as I can see, but when I build the level and run it, the entity won't move. Could anyone take a quick look at the code and see if anything is wrong?

Code:
// MyFPS.wdl
var video_mode=7;
var video_depth=16;
var move_vec[3]=0,0,0;
function main()
{
level_load ("MyFPS.wmb");
wait(2);
}
action player_move
{
player = me;
wait(1);
while(me!=NULL)
{
move_vec[0]=(key_cuu-key_cud)*3;
ent_move(move_vec,NULLVECTOR);
player.pan+=(key_cul-key_cur)*4;
wait(1);
}
}


Posted By: Xarthor

Re: FPS Tutorial, Ent_move not moving - 07/06/07 16:45

If you are using A6:
Use c_move, I'm not sure if ent_move is still supported.

If your are using A5:
You did not define a "move_mode"
Add the following line before your ent_move instruction:
move_mode = ignore_passable + glide;
Posted By: MattyTheG

Re: FPS Tutorial, Ent_move not moving - 07/06/07 18:57

I'm using A6, I assume ent_move works because the tutorial seems to be written for A6 but maybe it is a little buggy.

I added c_move like you told me, and for entity I used the entity name, yet it comes up with an error compiling the script that cbabe is an unknown value or something like that, is this how I'm supposed to set it up?

Code:
c_move(cbabe_MDL_002,move_vec,NULLVECTOR,glide);



cbabe_MDL_002 is her name on the sidebar on the left, and when I right click on her so I would assume that its right?

Thanks for the help guys, appreciate it, especially knowing code for 2 versions, thats experience Xarthor
Posted By: tompo

Re: FPS Tutorial, Ent_move not moving - 07/06/07 20:16

read manual about c_move
place this c_move in your cbabe's function/action and replace cbabe with me

example:
c_move(me,vector(some_vector,0,0),nullvector,glide);
Posted By: MattyTheG

Re: FPS Tutorial, Ent_move not moving - 07/07/07 17:40

hmm I read the little command help section at the bottom and thought I understood it but it still doesn't work.

I used:
c_move(me,vector(3,0,0),nullvector,glide);

It still doesn't work. I'm no coding expert (obviously) but it seems to me that this should work but looking at my code it seems like I never really defined what entity it should move? I just referred to everything as like player and me, shouldn't there be some line saying that player is the Cbabe model?
Posted By: tompo

Re: FPS Tutorial, Ent_move not moving - 07/07/07 17:47

create simple action and attach it to the model by WED

define _speed,skill1;
action my_player
{
player = me;
my._speed = 10;
while(me)
{
c_move(me,vector(my.speed * time_step,0,0),nullvector,glide);
wait(1);
}
}
Posted By: MattyTheG

Re: FPS Tutorial, Ent_move not moving - 07/07/07 18:57

I typed that up in Script Editor and then went to world editor and right clicked, chose behavior, and clicked the little envelope to open an action, and typed in cbabewalk.wdl (what I saved my script as) and when I run the game it says action <cbabewalk.wdl> can't be found.

Sorry if this is really simple and I'm just not getting it.
Posted By: tompo

Re: FPS Tutorial, Ent_move not moving - 07/07/07 19:05

check path or create your own action in main wdl or includ your wdl
© 2024 lite-C Forums