View Single Post
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default 05-14-2015, 01:32 PM

Quote:
Originally Posted by john316 View Post
1. I want to say that you've saved my life.
2. You said '' But the rest should be very easy to do but will take some time.'' Trust me no I'm an idiot.

What I've done so far
1.Created corner Squares and used the same code that you implemented, but I'm having issues with that characters. They're still going off the board. The method has been called (EndAlwaysEvent#)

2. I have created chutes/ladders methods for both characters, however when the player is within the certain distance the method does not follow through for (player 2) in some cases player1 (tortoise). I looked through and I don't see a mistake. In some cases the corner square methods don't register.

When the world is opened you will see new squares. (They're in groups)
Square color key
Yellow=square 100
White=corner
Purple=Chutes
Green=Ladders
Cyan= curves in chutes.

I'm sorry for being annoying
Well I for one would accept large sums of untraceable money

You have a couple of problems with you events.
First any event that contains an infinite loop will never finish (unless you have purposely engineered a way around it)
Second, the "When the world starts" event will only happen once, at the start of the movie. Once the method is done it will not be started again through this event.
Three, There is no guarantee which of the "When the world starts" events will be called first, or in what order they will execute.

What I think you are after is something like this:
Event:
While Object is within 1 meter of end10
Before - method to make any preparations for the event
During - method to move the object or whatever.
End - method to perform any cleanup needed.
In a lot of cases you will only need to use the During method and the Begin and End will be blank.

This event will run continuously checking to the while part to see if it is true. If the while part is false it will not do anything except check to see if the while part has changed.
If at some point the object is within 1 meter of the target ( in this case end10) then the methods will be called.
Caveats:
1. Any infinite loop will halt the movie and probably end up crashing Alice.
2. At the end of the "During" method the while condition should, in most cases, be false. Otherwise the event will be triggered again.
3. At any time only one while event should be active (true).

Hope this helps
Mark


Mark Henwood
mhenwood@ieee.org
   
Reply With Quote