Gamestudio Links
Zorro Links
Newest Posts
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
1 registered members (Ayumi), 662 guests, and 3 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
FPS Tutorial, Ent_move not moving #139919
07/06/07 15:58
07/06/07 15:58
Joined: Jul 2007
Posts: 48
M
MattyTheG Offline OP
Newbie
MattyTheG  Offline OP
Newbie
M

Joined: Jul 2007
Posts: 48
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);
}
}



Re: FPS Tutorial, Ent_move not moving [Re: MattyTheG] #139920
07/06/07 16:45
07/06/07 16:45
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
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;

Re: FPS Tutorial, Ent_move not moving [Re: Xarthor] #139921
07/06/07 18:57
07/06/07 18:57
Joined: Jul 2007
Posts: 48
M
MattyTheG Offline OP
Newbie
MattyTheG  Offline OP
Newbie
M

Joined: Jul 2007
Posts: 48
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

Re: FPS Tutorial, Ent_move not moving [Re: MattyTheG] #139922
07/06/07 20:16
07/06/07 20:16
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
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);


Never say never.
Re: FPS Tutorial, Ent_move not moving [Re: tompo] #139923
07/07/07 17:40
07/07/07 17:40
Joined: Jul 2007
Posts: 48
M
MattyTheG Offline OP
Newbie
MattyTheG  Offline OP
Newbie
M

Joined: Jul 2007
Posts: 48
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?

Re: FPS Tutorial, Ent_move not moving [Re: MattyTheG] #139924
07/07/07 17:47
07/07/07 17:47
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
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);
}
}


Never say never.
Re: FPS Tutorial, Ent_move not moving [Re: tompo] #139925
07/07/07 18:57
07/07/07 18:57
Joined: Jul 2007
Posts: 48
M
MattyTheG Offline OP
Newbie
MattyTheG  Offline OP
Newbie
M

Joined: Jul 2007
Posts: 48
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.

Re: FPS Tutorial, Ent_move not moving [Re: MattyTheG] #139926
07/07/07 19:05
07/07/07 19:05
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
check path or create your own action in main wdl or includ your wdl


Never say never.

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