Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Can I disable an event with another event
Old
bulletproof40
Guest
 
Status:
Posts: n/a
Default Can I disable an event with another event - 11-28-2009, 11:35 AM

In my game I'm supposed to have the boat stop if both the up button and the down button are pushed. I am using two while events to control the forward and backward motion, can I disable either or both events when a condition becomes true
   
Reply With Quote
Old
Akusai
Guest
 
Status:
Posts: n/a
Default 11-28-2009, 07:38 PM

Yes, it would be possible, but it probably would be easiest to take and create two boolean variables and have them set to true while the key is pressed (In a do together box with your direction of movement) and have the variable set to false when the key is released. To make it stop, you would need to drop a dummy object at the boat, and then in a while the world is running event, have if both (Forward variable) and (Backward variable) == true
Boat move to (Boat's dummy object.)

Since the dummy object is already in the same location as the boat, the boat will effectively move nowhere

P.S. Make sure that the Dummy Object's vehicle is the boat!
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.