#run condition not working

17 messages · Page 1 of 1 (latest)

warm edge
#

The .and should be done like this:
.run_if(in_state(What::Intro).and(run_once)) inside the run_if not outside.

next coyote
#

not working

warm edge
#

Oh also I didn't actually pay attention to what you were doing but I'm pretty sure the whole throuple (3-uple) will be executed only once because of the run_once, and if their conditions are not met when that happens, then they just won't run

#

That might explain why they never run

#

If you want each to be run once you should put the run once condition on each of them probably

next coyote
#

okay

#

holy shit it works finally

#

tysm

warm edge
#

happy to help!

next coyote
#

i was really at a roadblock here haha

warm edge
#

@next coyote Also, not sure what you're doing exactly but the way you're doing it if you quit the What::Intro state and re-enter it the systems won't run a second time either (I think).
Maybe you should not use run_once but use OnEnter(What::Intro) instead of Update and then in your system(s) insert entities with a Timer somewhere to do what you want to do once the timer runs out inside another system?

next coyote
#

yes i just saw that

#

im not a big fan of timers

warm edge
#

@next coyote You can use something like bevy_tweening for that kind of things too

next coyote
#

im using bevy_tween

#

can u tell me rq how to put >1 components in a With