Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,449 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
moving the ch! #219493
08/02/08 20:03
08/02/08 20:03
Joined: Jan 2007
Posts: 3
A
arashdj71 Offline OP
Guest
arashdj71  Offline OP
Guest
A

Joined: Jan 2007
Posts: 3
hi
i have a script to moving the character but it"s dont working
it"s dont showing error before run but my character don"t moving by key_cuu and key_cud and key_comma and key_period

script:

var video_mode=7;
var video_depth=32;
var move_vec[5] =(0, 10, 20, 30, 40);


var idle_percent = 0;
var walk_percent = 0;



action player_move
{
player = me;
wait(1);
while (me != NULL)
{
move_vec[0] = (key_cuu - key_cud)*3 *time;
move_vec[1] = (key_comma - key_period) *2 *time;
player.pan += (key_cul-key_cur)*4 *time;
ent_move(move_vec,NULLVECTOR);
idle_percent = (idle_percent +5*time)%100;
ent_animate(me,"idle",idle_percent,ANM_CYCLE);
wait(1);
}
}


function main()
{
level_load("level_1.wmb");
wait(1);
/////CAMERA/////
fps_max=50;
while (1)
{
mouse_pos.x = pointer.x;
mouse_pos.y = pointer.y;
camera.pan -= mouse_force.x;
camera.tilt += mouse_force.y;
wait(1);
}
}

thank you

Re: moving the ch! [Re: arashdj71] #219506
08/02/08 22:29
08/02/08 22:29
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
try to use c_move instead of ent_move



Ubi bene, ibi Patria.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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