Jump to content

Adding my own states


Recommended Posts

Hey @Droidz

through my plugin, I want to add some states of my own (mostly for custom training etc).
Unfortunately, when doing this OnEngineStart event, I always get:

[E] 13:50:08 - Engine > Pulse(): System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Collections.Generic.List`1.Enumerator.MoveNext()
   at robotManager.FiniteStateMachine.Engine.Pulse()

which makes sense. Is there any way to add my own states, currently? I couldn't find any event that fires before EngineStart and I am sure I'm not modifying the collection DURING Pulse on another thread.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...