Alice Community  

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

Thread Tools Display Modes
is alice broken?
Posts: n/a
Question is alice broken? - 11-12-2012, 05:44 PM

I feel like Alice isn't working properly, but I haven't used this program in a really long time, so i might just be doing something wrong, can anyone point out my mistake?

I want to be able to turn a flashlight on or off with one button during a game.

In the Events section, i have "When Enter is pressed, do <Flashlight.Switch>"

In the method i created "Flashlight.Switch" I have one variable called "On"

I have a tab that says If "On" == True, Flash Light.Turn Off, and then "On" set value to false.

In the "Else" section, i put Flashlight.Turn On, and then "On" set value to true.

I tested the on and off methods by themselves in the first method section, and they worked fine, so there has to be something wrong with my "If_Else" tab. I'll include a snapshot of my work in this thread.

Can anyone point out my mistake or give me some other help?
Attached Images
File Type: jpg slender flashlight method.jpg (19.9 KB, 19 views)
Reply With Quote
Just an Alice Thing
Senior Member
MrMoke's Avatar
Status: Offline
Posts: 501
Join Date: Sep 2007
Location: Austin, Texas
Default Just an Alice Thing - 11-23-2012, 11:59 AM

  1. Click on the Flashlight in Object Tree
  2. Click create new variable in Details Pane, and create a boolean variable.
  3. Drag that name into the areas in which you used the original variable.
  4. Delete the local variable you previously used.
  5. Should work now. At least it did for me.
Reply With Quote

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 ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.