Alice Community  

Go Back   Alice Community > Alice 2 > Works-In-Progress

Thread Tools Display Modes
Helping hand needed...
Pawn Nub
Junior Member
Status: Offline
Posts: 2
Join Date: Feb 2016
Default Helping hand needed... - 02-26-2016, 04:18 PM

Hey guys, I'm pretty new to Alice, but I managed to figure a couple things out pretty quickly.

Unfortunately, this game I've been working on is just not going my way today.

The game is pretty simple in logic, where you are in a complex with multiple rooms, and you try to move to the red box on the minimap in order to win without getting caught by the bogeyman.

However, I just can't seem to work out a portion of the game where after you click a door, it moves the minimap ENDLESSLY.

It keeps looping on and on... and even if it doesn't loop, I've also seen another problem where the variables for your location in the game will reset every time you go back to that method.

The program is still majorly unfinished, and I haven't added any code for the controls of the bogeyman as well... as this problem drained all my motivation.

I'm sorry if my description is a little vague, but I would loveeeeee to get some feedback on this.

Attached Files
File Type: a2w Scary game.a2w (1.72 MB, 9 views)
Reply With Quote
Senior Member
RavenOfCode's Avatar
Status: Offline
Posts: 409
Join Date: Oct 2013
Location: Northern Virginia
Default 02-27-2016, 08:30 AM

I'm not really sure I understand what your problem is? Do you want it to move the minimap endlessly? Were do you want the minimap to be?

Stuff + Other Stuff + Different Other Stuff = Things :)

My best Alice game:

Clash of the Cubes (an arena fighting game):
Reply With Quote
Mini Map Help
Senior Member
sfunk's Avatar
Status: Offline
Posts: 1,112
Join Date: Mar 2011
Location: I don't know
Default Mini Map Help - 02-27-2016, 02:01 PM

Check out the world I created to try to help give you an idea of how to make your mini map simpler.

Hope it helps,
Attached Files
File Type: a2w Mini_Map_Help.a2w (210.1 KB, 7 views)

If you are stuck on a project, check out the tutorials I made here at this link:

There are lots of tutorials on it so far, including some youtube videos, check it out


Go to my youtube channel to check out my alice 2.2 tutorials I have there..
Reply With Quote
Pawn Nub
Junior Member
Status: Offline
Posts: 2
Join Date: Feb 2016
Default 02-29-2016, 04:02 PM


I wanted the game to move the triangle to where your location on the minimap would be after you click a door. I don't want it to finish the "For" loop, but rather I wanted to immediately stop checking every increment on the "For" loop and wait for further instructions once a certain condition has been achieved.

So "For" loops work by looping a certain amount of times right? Such as "For all numbers 1-10" then it will go over every number to loop a total of 10 times.

But say I wanted the loop to stop at 6 because a certain command is at that number instead of going through all 10, how would I do that? I can't make it so that it stops looping once I hit a certain variable in the "For" loop.

So basically, I made an array of every location possible for the minimap, and once a door is clicked, then the "Minimap controls" method will then use the statement "If (variable) 'where you are' = (item from array) 'item_from_Where you could be" to skip every increment of the "For" loop until the 'item_from_Where you could be" matches your actual location which is recorded in the variable 'where you are'.

Then it supposedly should move the triangle to the corresponding square from 'item_from_Where you could be'

But the "For" loop will keep running. So lets say that I do hit condition 6 out of 10 on my example previously, what my problem is is that it will continue to check condition 7, 8, 9, and 10.

I just want to stop the "For" loop once the triangle moves once basically.

I'm sorry that this is a wall of text... but I'm kinda new at trying to explain this.
Reply With Quote
Quick Comments
Super Moderator
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default Quick Comments - 03-02-2016, 10:13 PM

Short answer:

1) Remember the first unprinted rule of programming: The darn thing does exactly what you tell it to!

2) In Minimap Movement there is nothing to stop the "for all ..., one ... at a tiime" the loop when a match is found. So if you select Forward, and start at 15, the index changes to 16 and, since 16 matches the next entry it increases to 17 and so the MiniMap continues to update until the last element is reached.
3) I have found using 3D text as and mouse clicks together can be problematic. Sometimes the event is not fired at all and other times it only works if you click on the ink.
4) Make sure the camera is pointing where you want it before moving it. Remember it might not be where you originally set it.
5) Other things to look at:
Use opacity and isShowing for an object at the same time in not recommended. If you are not using transparency (opacity between 0 and 1) then stick with isShowing.
The position of the current object should be stored in a world variable otherwise you minimap method will always start at 15 regardless of the previous position of the triangle.

Finally I would recommend writing several "helper" functions to do things like:
  1. Set and clear isShowing for your controls so that it is easier to turn them on and off without missing controls.
  2. Functions to select the index of the next location. This involves using Mod() and if statements to keep the triangle within the allowed range.

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