Page 1 of 1

Attach actor to path with direction correction

PostPosted: Sun Feb 27, 2005 6:59 pm
by infinito
First, i have made a path with 10 nodes in circular ways
Second, i have made 36 pictures (covering the 360 degrees) of a fly to attach to the path
Third, How can i made the picture change in relationship with the direction take in the path?
i e , if my actor is in a North-South section of the path, how can i change to my fly027.png image ?

Are there an option like "Attach to path with direction" . I think the only option is scripting. Can anyone paste a seccion of code to help me?

Thanks,

Obrigado Mark

PostPosted: Sun Feb 27, 2005 11:04 pm
by jazz_e_bob
The pictures need to be in one animation.

You need the first frame to be facing EAST and the others travelling anticlockwise.

edit

on draw actor:

Code: Select all
animpos = ((angle/360) * 36);


( for a 36 frame animation )

/edit

PostPosted: Sun Mar 06, 2005 2:48 am
by jazz_e_bob
Here are demos of an actor animation angle following a path.

It uses GE 1.2.8

edit
01.ged changes animpos ( still animation )
02.ged changes animindex ( moving animation )
/edit

http://www.artsystems.com.au/game%20editor/demo%20-%20path%20tracer.zip

PostPosted: Mon Mar 07, 2005 12:15 pm
by makslane
If you are using a single animation, use the animpos variable to change the frame

PostPosted: Mon Mar 07, 2005 4:33 pm
by jazz_e_bob
:oops:

Edited my entries. :wink: