Page 1 of 1

Follow path in steps ?

PostPosted: Wed Jan 24, 2007 4:47 pm
by akhad
Anyone know of any way to make your object follow a path in incremental steps, rather than following the whole path in one go ? For example, your object is assigned to a circular path, and you want your object to follow the contours of the path *only* when you press a key. With no key pressed the object stays at its last position, ready to move on aqain when the key is pressed once again.

PostPosted: Thu Jan 25, 2007 1:22 am
by makslane
Is not possible now, but I will put in my task list.

PostPosted: Thu Jan 25, 2007 3:21 am
by morcior
Currently you could do this with some code:

First make a variable on the actor you want to go in circles called "allowMove". Then use these script events:

on key down:
Code: Select all

circle_actor.allowMove = 1;



on key up:
Code: Select all

circle_actor.allowMove = 0;



on circle actor draw event:
Code: Select all

if (allowMove)
{
    angle += 0.1; // determines the size of circle
    directional_velocity = 2; // determines the speed
}



hope that helps

PostPosted: Thu Jan 25, 2007 9:52 am
by akhad
Thanks for the replies. I was thinking that the path curve could be accessed in a similar way to the animation frame process. i.e just like you can jump to frame 25 of a 50 frame animation you could jump to step 25 of a 50 step curve/path. Although paths don't really hold `frames`as such they are are created over a set time sequence and the nodes are similar to keyframes in cgi animation. A keyframing system would be great, each keyframe could hold extra data like curve type (bezier/linear etc) and even hold `delay` values so your object could stop for x amount of time at individual keyframes/nodes.
morcior, that looks interesting. I'll give it a go when I get back on my GE dev machine. Karma to you sir !