Page 1 of 1

Can't fix a problem with my level

Posted: Sat Feb 20, 2010 7:55 am
by Mouzi
Some of you probably have already seen this and also saw it working back when I made it. The level is "Just a level". Ok so when I made it, it was working fine, but before the competition was over it suddenly got buggy without me editing it. Now, because the level is a huge mess I was a bit reluctant to go poking around the code to see what's wrong. Anyway now I finally did that and here's a level showing just the problematic part. When you shoot down the green switch the triangle should stop rotating and stay that way, but it doesn't. The AI code is this:

Code: Select all

makeTrigger,timeRepeat,1,480,stop,rotatePart,131
makeTrigger,timeRepeat,1,480,stop,rotatePart,131
makeTrigger,timeRepeat,1,480,rotatePart,131,2.5,0,0,0
makeTrigger,timeRepeat,1,480,rotatePart,131,2.5,0,180,0
makeTrigger,timeRepeat,241,480,stop,rotatePart,131
makeTrigger,timeRepeat,241,480,stop,rotatePart,131
makeTrigger,timeRepeat,241,480,rotatePart,131,2.5,-180,180,0
makeTrigger,timeRepeat,241,480,rotatePart,131,2.5,0,180,180
makeTrigger,death,1,stop,makeTrigger,timeRepeat,1,480,rotatePart,131,2.5,0,0,0
makeTrigger,death,1,stop,makeTrigger,timeRepeat,1,480,rotatePart,131,2.5,0,180,0
makeTrigger,death,1,stop,makeTrigger,timeRepeat,241,480,rotatePart,131,2.5,-180,180,0
makeTrigger,death,1,stop,makeTrigger,timeRepeat,241,480,rotatePart,131,2.5,0,180,180
makeTrigger,death,1,makeTrigger,time,120,rotatePart,131,0,0,0,0
makeTrigger,death,1,makeTrigger,time,150,rotatePart,131,0,0,0,0
And part code:

Code: Select all

core, 400, 300, 0, 1, 1, -1, 0, 006600
rightTri, -2, -24, 0, 1, 1, e0, 131, FFFFFF
switch3b, 0, 82, 0, 1, 1, e0, 1, 33FF00
So here's the question: Can it be fixed? I don't see anything obviously wrong here but I could just be blind to my own mistakes. I just can't figure out why it does this to ONE part only even though the level has two identical sides with both having at least one or two of this same kind of code. The only difference I can think of is that this is the first one of those parts and also the first triggers of those parts.

Re: Can't fix a problem with my level

Posted: Sat Mar 27, 2010 10:21 am
by asdasdg
Mouzi, I think I figured out your problem.....
If you take a look here, you will see that my intention was to completly stop the part rotation. to do that, I tried using a STOP command but that did not work. The thing that got it to work was when I imput an oposite rotation trigger with a time delay.

Code: Select all

rotatePart,1,1,0,-90,0
makeTrigger,time,90,rotatePart,1,-1,0,0,0

Code: Select all

core, 400, 300, 0, 1, 1, -1, 0, 0066FF
switch4b, 30, -24, 0, 1, 1, e0, 1, 8F79FE
stick, 67, 3, 0, 1, 1, e1, 3, 0066FF

Re: Can't fix a problem with my level

Posted: Sun Mar 28, 2010 9:24 am
by Mouzi
Yeah, I know you can stop rotation by rotating in the opposite direction at the same speed. But it gets a bit complicated on my level because I use timeRepeat triggers. I'd have to repeat the opposite rotation too. Possible, perhaps, but I would've liked a better solution :P maybe there just isn't one. I might try that later though, thanks for the suggestion.