fray icon indicating copy to clipboard operation
fray copied to clipboard

FrayCombatStateMachine.buffer_sequence not working as intended

Open 20milliliter opened this issue 2 years ago • 3 comments

Given the following FrayRootState:

var standing_state = FrayRootState.builder()\
	.transition_sequence("idle", "punch", {sequence="punch"})\
	.transition_sequence("idle", "kick", {sequence="kick"})\
	.start_at("idle")\
	#idle is returned to via a goto_start_state() call within AnimationPlayer animations
	.build()
	combat_state_machine.add_situation("standing_state", standing_state)

and the following print out of events:

Buffered punch into state_machine
Transitioned from idle to punch 
Buffered kick into state_machine
Transitioned from punch to idle

Intended behavior would be for a transition from idle to kick to occur thereafter, correct?

20milliliter avatar Apr 01 '23 14:04 20milliliter

Your state machine construction looks fine. Make sure the state machine node is both active and allows transitions.

Pyxus avatar Apr 07 '23 04:04 Pyxus

Any update on if you're still experiencing issues? I'm trying to close up the issues that have been building up

Pyxus avatar May 24 '23 20:05 Pyxus

Yes, I am. I've ensured the node is active and allows transitions.

Buffered 'S'.
'idle' transitioned to 'S'.
Buffered 'M'.
'S' transitioned to 'idle'.
#Expected: 
#'idle' transitioned to 'M'.

20milliliter avatar May 25 '23 12:05 20milliliter