Skip to content

Using hsmcpp in gamedev #6

Closed Answered by igor-krechetov
ershovdz asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @ershovdz.

In general, the easiest way to repeatedly trigger some event for active states would be to use a repeating timer:

But if I understand right the documentation, self transition will be executed only for the current active substate (not parent).
Yes, if both child and parent have exactly same event defined then only child's transition will be executed (Priority of transitions). So no, it's impossible to execute some function for both parent and active child on a single event. But there are way to workaround it (for example by using 2 different events for parent and for children and triggering parent event from a child self-transition).

I have a feeling you are trying to do …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ershovdz
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants