Behaviour Execution Error
BigDave
Member Posts: 2,239
This Issue seem to be new to me. The order of execution is not going through correctly.
Its a very basic behaviour like this
I would expect the actor to immietly stop as the variable is turned to 1
But it never stops.
It only works if I delay it with a timer.
Comments
Here the file
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
I found the issue trying to nailing down a bugged behaviour in my new game and this is what it boiled down to
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
This has been occurring for years. You can get around it by just having a seperate rule, if you don't want to use timers:
Edit: I don't really understand why you would have logic set this way, since the move behaviour wouldn't actually move the actor?
GSLearn.com | Templates | Free Demos | Udemy Course
@Two.E
interesting I figured I alway did this in the past with move/ accelerate
I was blocked by this issue now because I did this without the timer
Which lead the Rule within to determine if the player is left or right to re-trigger even tough the variable decided was already 1
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
Did the solution without the timer work? Or are you saying it didn't work?
GSLearn.com | Templates | Free Demos | Udemy Course
@BigDave
This has been an issue for a while and quite serious especially when trying to teach new developers the value of "state machines" in game logic.
What happens is that, when a rule gets executed AND its condition subsequently turns false WITHIN THE FIRST draw frame, that rule looses its functionality for ever.
As you noticed, putting a small delay in (even a 0 Timer makes it skip a frame) helps.
Unfortunately it is counter intuitive, and especially causes problems with "state machines" - one of the most basic coding techniques in games.
The bug is here: http://bugs.gamesalad.com/show_bug.cgi?id=1509
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
@Hopscotch
Thats good to know. In theory, it could be fixed. Since its seems to be a connected to education, it might be looked into @ForumNinja
GSLearn.com | Templates | Free Demos | Udemy Course
Serious issue, potentially causing hours of wasted time looking at otherwise perfectly good logic, whenever it rears it's head? - reported 9 months ago, many comments, still no fix?...
Seriously, GS need to pull their finger out - at least fixing stuff like this would re-instate some confidence that ANY of our highlighted (and sometimes crippling) bugs are going to get fixed going forward?