Instant Flag and Event

klamore74

New member
Hi,

I have two separate problems, one from the "architecture" point of view, the other relative to the "Instant" flag.


In my behavior, I have a conditional that checks a "random event". When this conditional return Success, I want to play a sequence of action. The event is repeatable during the behavior, so I put on the conditional abort. The problem is that if I set conditional abort, the sequence stop next frame after, because the "check" on random event return failure.

How is the best way to do that?

Trying to resolve the problem, I tried this solution:

1596733601671.png

Basically, when the random event return success, I put on a variable, and than a selector keep alive the sequence.


And in this I have the problem about "Instant flag". Both "Player too noisy" and "Attracted=true" are flagged "Instant", but it not run on the same frame, so the variable is never setted.

I resolve it returning "Success" from "Player too noisy" for two frames, but is not how I aspect it works with "Instant" flag on.

Any advice about that? What I'm doing wrong?

Thanks,
Moreno
 

abc123

Member
In my behavior, I have a conditional that checks a "random event". When this conditional return Success, I want to play a sequence of action. The event is repeatable during the behavior, so I put on the conditional abort. The problem is that if I set conditional abort, the sequence stop next frame after, because the "check" on random event return failure.

How is the best way to do that?
From your description and screenshot it seems the problem is that conditional aborts are set to "both". That's why sequence stops next frame, when condition fails. If you want the sequence to fully run once it started, set the abort type to "lower priority".

However, I can tell you from my experience, that's a bad design. Because If during this behavior enemy will be disturbed by another player, it won't react properly. However, if you have only single player, it's probably fine.
 
Last edited:
Top