Alice Community  

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

Reply
 
Thread Tools Display Modes
Temporarily disable controls?
Old
Revolt
Member
 
Revolt's Avatar
 
Status: Offline
Posts: 33
Join Date: Oct 2010
Smile Temporarily disable controls? - 11-25-2010, 09:48 AM

I have a little chopper-shooter game, and I would like to disable controls as the guy climbs into the chopper, and then flies to the main "battlefield". I have a lot of controls (for the chopper/camera), so how can I disable them at the beginning of the game, then allow them again?
   
Reply With Quote
Old
Revolt
Member
 
Revolt's Avatar
 
Status: Offline
Posts: 33
Join Date: Oct 2010
Default 11-25-2010, 12:34 PM

Bump
   
Reply With Quote
Old
beachbum111111
Senior Member
 
beachbum111111's Avatar
 
Status: Offline
Posts: 852
Join Date: Feb 2010
Location: e
Default 11-25-2010, 12:40 PM

lol


"Don't lead me into temptation I can find it myself"
   
Reply With Quote
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Arrow 11-25-2010, 12:49 PM

You could have a controls enabled variable and have an
if controls enabled == true in each key event. Then you could set it true or false as needed


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [-]
   
Reply With Quote
Old
Revolt
Member
 
Revolt's Avatar
 
Status: Offline
Posts: 33
Join Date: Oct 2010
Default 11-25-2010, 03:43 PM

alright, but is that the only way? I've had...bad *shudders* experiences with variables before
   
Reply With Quote
Old
Akira101
Guest
 
Status:
Posts: n/a
Default 11-25-2010, 03:46 PM

Yeah, pretty much thats the only way.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 11-25-2010, 04:06 PM

Variables aren't so bad. As long as you keep them to the world-level variables, it doesn't get too complicated. Once you start making object-variables and method-variables, and try to use those variables outside of the places you are supposed to, thats when things screw up... So just stick with all variables being world-level variables.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
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 ©2021, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.