make actor fire in last direction standing

Game Editor comments and discussion.

make actor fire in last direction standing

Postby Zehper48 » Sun Aug 13, 2006 6:19 pm

How do i make an actor fire in the last direction he was standing. like if the last key down what up if you press space he will fire up and not down. please be specific i am still new to the scripting :) thanks[/img][/list][/code]
I like score
User avatar
Zehper48
 
Posts: 241
Joined: Sun Jun 11, 2006 1:34 am
Location: Advanced Noob
Score: 4 Give a positive score

Postby makslane » Mon Aug 14, 2006 5:19 pm

Create a variable to hold the key state.
In the Key Down event for the Up key, you can set the variable:
keyUp = 1;

In the Key Down event of Space key, test the keyUp variable:
Code: Select all
if(keyUp)
{
   //Your action here
}
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby hollywoodcolor » Mon Aug 14, 2006 11:02 pm

hollywoodcolor
 
Posts: 4
Joined: Sun Jul 23, 2006 6:12 am
Location: California
Score: 0 Give a positive score

Postby Zehper48 » Wed Aug 16, 2006 11:58 am

its not that it doesnt work its im not sure how to put that into use.I dont know how can you be a little more spasific and step by step really helps :D
I like score
User avatar
Zehper48
 
Posts: 241
Joined: Sun Jun 11, 2006 1:34 am
Location: Advanced Noob
Score: 4 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron