Attach actor to path with direction correction

Talk about making games.

Attach actor to path with direction correction

Postby infinito » Sun Feb 27, 2005 6:59 pm

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
infinito
 
Posts: 5
Joined: Fri Feb 11, 2005 4:22 pm
Score: 0 Give a positive score

Postby jazz_e_bob » Sun Feb 27, 2005 11:04 pm

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
Last edited by jazz_e_bob on Mon Mar 07, 2005 4:28 pm, edited 1 time in total.
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby jazz_e_bob » Sun Mar 06, 2005 2:48 am

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
Last edited by jazz_e_bob on Mon Mar 07, 2005 4:32 pm, edited 1 time in total.
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby makslane » Mon Mar 07, 2005 12:15 pm

If you are using a single animation, use the animpos variable to change the frame
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby jazz_e_bob » Mon Mar 07, 2005 4:33 pm

:oops:

Edited my entries. :wink:
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest