open doors etc.

Talk about making games.

open doors etc.

Postby S0L1Dfake » Tue Dec 05, 2006 2:05 am

I am new to GE and I really like it but I have sort of a dumb question. Whats the best way to make 'keydown' events occur only in certain areas? For example if u want a character to enter a door by pressing up while standing in front of the door only. How do u get 'up' to open the door and change level area only when in front of the door and not anywhere else?
Thank you for your help.
User avatar
S0L1Dfake
 
Posts: 15
Joined: Mon Dec 04, 2006 7:31 am
Location: Cleveland, Ohio
Score: 0 Give a positive score

Postby Hedfone » Tue Dec 05, 2006 9:41 pm

ok this is a bit lenghly but here goes.

make a keydown event on your "Door" actor.
Code: Select all
keydown (up do some action to put you in the room


then on create actor, event disable, key down.

on collision with "player" event enable, key down
on collision finish with "layer" event disable key down.



and that should do it! :D
User avatar
Hedfone
 
Posts: 174
Joined: Mon Jul 31, 2006 9:47 pm
Score: 2 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest