Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Grant, AndrewAMD), 911 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 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 | 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