Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,403 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 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 | 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