Real Comparison Bug created going from 0.9.8 to 0.9.8.2

thebitmasterthebitmaster PRO Posts: 75
edited November -1 in Tech Support
I've got a Real variable initially set to 0. I have two rules.

If RealVariable <= 0, reset RealVariable to random(50,150)

timer every .3 seconds
RealVariable = RealVariable -10

In 0.9.8, this would correctly cause the value to get reset every time it dropped to zero or below. In 0.9.8.2, it only execute the reset once, after which the value just freefalls into subzero territory forever.

I can correct this by putting the comparison into the timer like this:

timer every .3 seconds
RealVariable = RealVariable -10
If RealVariable <= 0, reset RealVariable to random(50,150)

However, the difference in behavior between the two versions is pretty severe.

To make matters worse, if you change the initial value of RealVariable to a positive number like 50, both algorithms work the same way. If it was just an optimization, this wouldn't be the case. It's a bug, and I've reported it to the GS team.

Comments

  • beefy_clyrobeefy_clyro Member Posts: 5,394
    I've had many issues like this recently ... I have a game that was using recycled actors and was all setup for an instant reset. Other actors' behaviours were triggered by the score the player had, once he dies that was reset to 0, once the game instantly restarted and then the score reached the level again ... Nothing happens. Its like rules only fire once now unless wrapped in a timer but then that starts to hurt the game! I now have to reset the scene upon game over, this then means a couple of seconds load time again upon the instant reset i had built in!
  • Rob2Rob2 Member Posts: 2,402
    @thebitmaster strange... it works fine if variable doesn't start at zero, I guess its a timing issue.
  • thebitmasterthebitmaster PRO Posts: 75
    The real question here is "under what circumstances is a stand-alone Real comparison rule supposed to fire?" Previously it seems like it would fire every time the variable changed. Now it seems, as @beefy_clyro and I stated, to only fire the first time it's hit, then not again unless it's in a timer.
  • threepeasoupthreepeasoup Member Posts: 33
    I think this may be my problem as well. Pre patch 9.8 my real variables would trigger infinitely. Now after patch it only triggers once. Good find thebitmaster! I sent my game to the game salad team when my game broke after the patch. Hopefully this real variable issue helps them find the bug or problem. So far this new update has put a stop my game development. (may actually try to venture outside.....)
  • Rob2Rob2 Member Posts: 2,402
    @thebitmaster In your example changing the initial value of your real variable to 1 (instead of zero) or making your test <= -1 and your rule will fire repeatedly without resorting to the use of a timer.
  • Rob2Rob2 Member Posts: 2,402
    But I can see that for no apparent reason the same system that was working fine in 98 is no longer working in 982 it fires once then keeps going south!! The changes I suggested above obviously might not fit in with your system.
Sign In or Register to comment.