Replies: 3 comments 1 reply
|
For now, I used |
1 reply
cycle = (
idle.to(melee, cond="can_melee") |
idle.to(reloading, cond="mag_empty", unless="can_melee") |
idle.to(shooting, cond="can_shoot", unless=["can_melee", "mag_empty"]) |
idle.to(walking, cond="can_patrol", unless=["can_melee", "mag_empty", "can_shoot"]) |
idle.to(idle, unless=["can_melee", "mag_empty", "can_shoot", "can_patrol"]) |
walking.to(melee, cond="can_melee") |
walking.to(reloading, cond="mag_empty", unless=["can_melee"]) |
walking.to(shooting, cond="can_shoot", unless=["can_melee", "mag_empty"]) |
walking.to(idle, cond="can_take_a_break", unless=["can_melee", "mag_empty", "can_shoot"]) |
walking.to(walking, cond="can_patrol", unless=["can_melee", "mag_empty", "can_shoot", "can_take_a_break"]) |
shooting.to(melee, cond="can_melee") |
shooting.to(reloading, cond="mag_empty", unless="can_melee") |
shooting.to(shooting, cond="can_shoot", unless=["can_melee", "mag_empty"]) |
shooting.to(idle, unless=["can_melee", "mag_empty", "can_shoot"]) |
melee.to(melee, cond="can_melee") |
melee.to(reloading, cond=["mag_empty", "can_shoot"], unless="can_melee") |
melee.to(shooting, cond="can_shoot", unless=["can_melee", "mag_empty"]) |
melee.to(idle, unless=["can_melee", "can_shoot"]) |
reloading.to(melee, cond="can_melee") |
reloading.to(reloading, cond="mag_empty", unless="can_melee") |
reloading.to(shooting, cond="can_shoot", unless=["mag_empty"]) |
reloading.to(idle, unless=["can_melee", "can_shoot"])
)I did like so. Is this the wrong way? |
0 replies
|
I think I see my mistake. The paranthesis makes it a set. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Greetings there,
Hope all are well. I was wondering if I could give priority to a transition when you can technically do two transitions at the same time (both being valid). I made a FSM for a soldier that would shoot, and when a target is in shooting range, and the magazine is empty, it needs to prioritize transitioning to reload than to shooting again.
I apologize if the question is silly. I am quite new to this wonderful package.
All reactions