Gamestudio Links
Zorro Links
Newest Posts
Removing outliers from files
by AndrewAMD. 12/02/26 15:26
SGT_FW
by Aku_Aku. 11/30/26 08:19
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 8,567 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
moving the character! #219298
08/01/08 19:07
08/01/08 19:07
Joined: Jan 2007
Posts: 3
A
arashdj71 Offline OP
Guest
arashdj71  Offline OP
Guest
A

Joined: Jan 2007
Posts: 3
hello!
i want to moving my character by left and right arrow keys in ent_move!
my script:

var video_mode=7;
var video_depth=32;
var move_vec[0];
action player_move
{
player = me;
wait(1);
while (me!= NULL)
{
move_vec[2] = (key_cuu - key_cud)*3 *time;
player.pan += (key_cul - key_cur) * 4 * time; // placed here just before ent_move
ent_move(move_vec,NULLVECTOR);
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);
}
}

but before runing showing this error:

tahnk you!

Last edited by arashdj71; 08/01/08 19:09.
Re: moving the character! [Re: arashdj71] #219303
08/01/08 19:59
08/01/08 19:59
Joined: Apr 2006
Posts: 10
Brasil
alves Offline
Newbie
alves  Offline
Newbie

Joined: Apr 2006
Posts: 10
Brasil
You have created an array of only one value, then not there is move_vec [2].

To use the move_vec [2], it must create an array of 3 values, thus: move_vec [2];

Now you have:
move_vec [0]
move_vec [1]
move_vec [2]


Breve Meu E-BOOK
Desenvolvimento de Jogos Em Lite-C
Iniciante em 3D Game Studio
Meu Portfólio

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