Follow path in steps ?

Ideas for Game Editor evolution.

Follow path in steps ?

Postby akhad » Wed Jan 24, 2007 4:47 pm

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.
User avatar
akhad
 
Posts: 43
Joined: Tue Jan 16, 2007 1:59 pm
Location: U.K
Score: 0 Give a positive score

Postby makslane » Thu Jan 25, 2007 1:22 am

Is not possible now, but I will put in my task list.
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby morcior » Thu Jan 25, 2007 3:21 am

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
morcior
 
Posts: 83
Joined: Fri Jan 12, 2007 12:16 am
Location: UK
Score: 9 Give a positive score

Postby akhad » Thu Jan 25, 2007 9:52 am

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 !
User avatar
akhad
 
Posts: 43
Joined: Tue Jan 16, 2007 1:59 pm
Location: U.K
Score: 0 Give a positive score


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest