|
Hey Guys, How do i make a object enable by pressing the E key and then making it disable by pressing the E key again please help thank you :)
(comments are locked)
|
|
One way to do it (I'm sure there are better) Imagine a button for a door, for example's sake: Button on a wall that has a child object of an empty gameObject, that's a trigger. When the player presses e, he sends a message (that doesn't require a reciever) that says "useSomething". When the trigger receives said message, it then sends the required variable change (Boolean might work well; doors are only open or closed, typically). I forgot to mention, that using Switch(booleanName) might be something you're looking for, but I'm not an API expert by a long shot and I didn't do the research.
Oct 17 '10 at 06:55 AM
FreeTimeDev
Hey Matthew thank you very much :)
Oct 18 '10 at 01:54 AM
MC HALO
(comments are locked)
|
