Bug Issue: When Boolean Is True, All Timed Events Won't Cancel


Pages: 1

Mineat

  • Level 3 Stencyler
August 31, 2019, 12:13:08 am
The attached behavior is a behavior for one of my bosses in my game. In the "when Move is true" event, all of the timed events won't cancel after it is hit or getting ready to wait(perching), and it ends up spamming those events more  the more the "Move" attribute is set to true.

Is this some sort of bug?
« Last Edit: August 31, 2019, 12:15:54 am by Mineat »


New attachment added by Mineat - August 31, 2019, 12:13:48 am


Issue updated by Mineat - August 31, 2019, 12:15:54 am
  • Issue renamed from "When Boolean Is Set To False, All Timed Events Won't Cancel" to "When Boolean Is True, All Timed Events Won't Cancel"


Luyren

  • Master Stencyler
  • *
August 31, 2019, 03:34:39 pm
First: you are setting AI Path to 2 in other events, but in the only place that checks for AI Path = 2, you are immediately before that setting AI Path to random integer between 0 and 1. That check AI Path = 2 will never execute because of that.

Second: the "do every X seconds" block doesn't execute in between it's period. Since you have an event that set "isHit" to false immediatelly after it is set to true, the "isHit?" check where you are spawning the "Mine" actor will probably never execute. "isHit" would have to become true at the exact frame that do every decides to execute. Same goes for perching.

These are some of the issues that I could find with your code.


Mineat

  • Level 3 Stencyler
August 31, 2019, 09:47:49 pm
So I put every "do every x seconds" block's code from the "when Move becomes true" event into its own "do every x seconds" event with an "if Move" event block encasing it and took every "if isHit? or Perching" and "if isHit?" event block out of each, and it worked. I can't see why these timed events can't work altogether in one event...


Luyren

  • Master Stencyler
  • *
September 01, 2019, 04:10:13 am
So I put every "do every x seconds" block's code from the "when Move becomes true" event into its own "do every x seconds" event with an "if Move" event block encasing it and took every "if isHit? or Perching" and "if isHit?" event block out of each, and it worked. I can't see why these timed events can't work altogether in one event...
As I said: your "isHit" and "isPerching" attributes were only true for one frame at the most, that was your problem. Your periodic checks would never reach those frames consistently. Either way, glad you got it working.


Pages: 1

Details

  • Reported
    August 31, 2019, 12:13:08 am
  • Updated
    September 01, 2019, 04:10:13 am

  • View Status
    Public
  • Type
    Bug
  • Status
    New
  • Priority
    Normal
  • Version
    (none)
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    Design Mode Blocks

Tags


Attachments


* Bot Fly Boss Behavior.png (287.05 kB, 1929x5915 - viewed 322 times.)