help with siple code(imma n00b)

Talk about making games.

help with siple code(imma n00b)

Postby DBGames » Fri Aug 21, 2009 7:03 pm

i have a charectar that when you hold the Up key he floats in air(w/jetpack) and by floats i mean moves up a bit the down but never hit ground till i release the up key
User avatar
DBGames
 
Posts: 113
Joined: Wed Jun 24, 2009 10:13 am
Location: Bismarck, North Dakota
Score: 8 Give a positive score

Re: help with siple code(imma n00b)

Postby skydereign » Fri Aug 21, 2009 10:07 pm

A simple way of doing this is to add a path of the initial arc, and it will end up going to the height you want it to by the end of the path. Now you would add a path finish event, that sets a variable that would prevent gravity. This may not be necessary depending on your animations, as you could use animindex to determine when to have gravity in the draw actor. If you need a demo or just further explanation I will be happy to help.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest