Need a little help here with some logic that doesn't seem to be making sense
Ok - so, I have the following:
Apologies for the gif quality. I didn't exactly spend a lot of time optimizing it.
It is in essence, a laser beam. That's supposed to stop spawning more laser beam parts when it hits a 'floor' piece. That logic is sound - if it his a floor object, that section of the laser destroys itself (eventually to be replaced with a 'splatter' animation). It's doing that perfectly.
However, in the logic for the beam, as you can see below, it's supposed to not spawn another instance of itself when hitting that floor object:
Yet it certainly APPEARS to be doing both actions, both the destroy action as well as the spawn next action. What the mess am i missing here?! Anyone have any ideas!?
Side note: Initially, the logic for 'if next allows = true' was outside the whole large logic piece, but that was executing the same behaviour, and I moved it in there to try, just to try something different. I forgot to move it back out before capturing. but the behaviour is the same.
Comments
You may need to wrap the change attribute in a short timer to ensure that it's firing correctly. You won't have to do this in Creator 1.25 as we will have the ability to run behavior sequentially; we can be assured that behaviors will fire before the next behavior is activated.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
@Braydon_SFX
Thanks for that suggestion. Holy crap it worked. Just put the whole logic block in a timer and viola - done. Even weirder is that the 'spawn next' boolean was set to false as the default - could not figure out how it was getting anything other that 'do not spawn' as the behaviour!
Any idea when 1.25 is coing out?! =P
It does, however, create a slight 'pulling' behaviour to the animation now though - like it's dragging. I'll leave it like it is until 1.25 - then hopefully it will make it work.
Guess there's no way to fix that for now.
I'll just be keeping the laser cannon 'enemy' for an IAP chapter later on when the next version of GSC comes out. Relegated to my Area51 testing scenes in the project for now!
Try reducing the timer time - something as low as 0.06 should work (with Run to Completion checked).
The GS team is currently fixing up the last bugs for 1.25. It's a great build and I hope it's released soon. Keep up to date with the 1.25 thread here on the forums for further information.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx