Problem with switching Boolean on exit.

I have a typical motion graph of idle_walk_run that works correctly.

What I want is a left/right jump that cycles after each jump using a Boolean SwitchSide.

It all works fine going into the jumps by manually setting SwitchSide to either true or false so that parts working but what I’m having difficulty with is resetting SwitchSide to the opposite state once a jump is completed.

I tried adding a “set SwitchSide” but I can’t seem to get it into the can enter transition result.

Tried a few things but no joy so any help would be appreciated.

Hi Frankie,

You can use a state or transition notify to do what you want.

Select a state or transition, and you can type in a custom notify name there, and then you can place a custom event in the event graph named AnimNotify_NameYouPicked (note that you need to prepend “AnimNotify_” to whatever event name you entered on the node). That event will fire whenever the condition is fulfilled, as listed below:


On states:
	// state is first entered (weight within the machine becomes non-zero)
	FAnimNotifyEvent StateEntered;
	// state is finished exiting (weight within the machine becomes zero)
	FAnimNotifyEvent StateLeft;
	// state is fully entered (weight within the machine becomes one)
	FAnimNotifyEvent StateFullyBlended;

On transitions:
	FAnimNotifyEvent TransitionStart;
	FAnimNotifyEvent TransitionEnd;
	FAnimNotifyEvent TransitionInterrupt;

Cheers,
Michael Noland

Should have mentioned I’m using a blueprint only temple as well as /me= content creator is the only code that I’m familiar with.

The posted process is unclear to me and a cookbook break down would be of help.

Not a deal breaker but as the animator on our team all I’m really after is a cheap solution to figure out the linear progression and timing that will be hard coded later.

Hi Frankie,

You can (must) do that all in the animation blueprint.

Step by step (you may have already done some of these):

  1. From your non-jumping state, make a transition to jump1 state with rule bIsJumping AND bSwitchSide (or whatever your variables are named)
  2. From your non-jumping state, make a transition to jump2 state with rule bIsJumping AND NOT bSwitchSide (or whatever your variables are named)
  3. For each jump state:
    3.1) Select the jump state in the state machine, and look in the details panel
    3.2) Expand StateLeft and type in ExitedJumpState
  4. Go to your event graph, and right click. Find ‘Add Custom Event…’ and choose it
  5. Edit the name of the custom event to be ‘AnimNotify_ExitedJumpState’
  6. Set the SwitchSide variable to NOT SwitchSide

Alternative approach:

  1. Make a single state with a BlendByBool node that picks between jump1 and jump2, transition rule of bIsJumping (or whatever your variable is named)
  2. Select the jump state in the state machine, and look in the details panel
  3. Expand StateLeft and type in ExitedJumpState
  4. Go to your event graph, and right click. Find ‘Add Custom Event…’ and choose it
  5. Edit the name of the custom event to be ‘AnimNotify_ExitedJumpState’
  6. Set the SwitchSide variable to NOT SwitchSide

Cheers,
Michael Noland

Excellent works now Thanks.

Did not work first time, nothing ever does, but I understood the logic and by more or less pushing buttons I got the result.

Awesome stuff if I can figure it out. :wink: