just move an object

Posted By: gila

just move an object - 06/19/06 09:39

i, i discovered this beautifoul software just yesterday, i'm following some tutorial but i do not understand how to move an object.

if i have a cube called "cube_test" how i can refeer to it and move it by the keyboard?

thank you and sorry for the baracing question
Posted By: Des_Tiny

Re: just move an object - 06/19/06 10:21

You only can move entitiy objects (eg: *.mdl, *.wmb). Right click on an entity in WED, choose Properies and Behaviour. There you have to choose the action you want. A simple move action (without collision) could be:
Code:
 
action move_cube
{
var move_speed = 2;
while(1)
{
my.x += key_cuu * move_speed * time - key_cud * move_speed * time;
my.y += key_cur * move_speed * time - key_cul * move_speed * time;
wait(1);
}
}


© 2024 lite-C Forums