View Single Post
Could this be a bug? (Alice 2.3)
Old
CellularDecay
Junior Member
 
Status: Offline
Posts: 7
Join Date: Jan 2013
Location: Kapolei, Hawaii
Question Could this be a bug? (Alice 2.3) - 04-15-2013, 06:22 PM

I'm working on a simple targeting system for a game, but I've run into a problem. In an If/Else statement, I haved 2 lines of code in the True part, but only 1 line executes.

What makes it even more confusing is the offending line DOES execute when targeting one particular object, but none of the others.

This inconsistancy makes no sense to me. If the statement is True, BOTH lines should execute every time. If there is a problem with the way I coded it, then neither line should execute. The fact that 1 True line executes and the other doesn't defies logic. Add to that the fact that both lines do work on only one particular target and it just makes no sense whatsoever!

I even showed this to my professor and he was stumped.

So... any Alice gurus here that like a challenge?

Bascally, the code looks at a list of potential targets and checks if the aiming device is pointed at anything on the list. If it is, it returns True, and what was supposed to happen was the targeting reticle (dot) would turn red, and the ring around it would turn green.

This did not work, except on the last item in the list. So to check if it was a problem with the list, I made it so that the target itself would turn red (instead of the reticle) and THAT WORKED!???

Every target turns red when the aiming device passes over it, but the aiming device itself will only change color on the last target in the list. Since both commands are located in the same place in the code (True) I can not figure out why it's not working.

Thanks to any and all who can help with this.
Attached Files
File Type: a2w targeting_test.a2w (4.39 MB, 15 views)
   
Reply With Quote