by Fuzzy » Sun Mar 26, 2006 4:29 pm
Ok. this is tricky, and i must say, you are very patient. To learn to program in another language must be very hard! I am pleased that you try so hard.
I am writing this for my own sake too, because it is a very odd problem, and I want to understand it too. I hope it helps you as well.
When you put a ; at the end of the if, you are saying to GE that IF is finished. the {} brackets are a way to group commmands together, and they tie those commands to the IF.
Since you used ; GE goes ahead and does what comes next, and basically ignores what happened in the IF. It does the next lines all the time.
So when you take the ; away, it seems to be more broken, but its not. Its getting closer to being fixed!
Because we know the If line is fixed, we have to guess two things. perhaps player is not really at 72, or perhaps there is a problem with changepath.
First we will test to see if we get to 72 for sure.
Make a testing actor, and make it a text actor. Make the text say "NOT 72!" to start.
then we change your code a little bit!
if(player.x == 72) // no ;!
{
// stop this action for now. ChangePath("Event Actor", "noName", BOTH_AXIS);
Testingactor.textNumber = 72;
}
Try that. If it works, then we know the problem is somewhere in the ChangePath("Event Actor", "noName", BOTH_AXIS);
If it works, you will see right away! This trick works in all sorts of places for testing problems.
I'll check back as soon as I can! I want to get you past this. If anyone else sees, and wants to help before I do, go ahead! Lets get regine past this!
You can put the ; back to see what it does to the code. // means comment, and causes GE to not use that line, if you did not know. Its great for leaving notes!
Mortal Enemy of IF....THEN(and Inspector Gadget)
Still ThreeFingerPete to tekdino