Hello Your Spriteness,
I came back to you after extensively using Truestate (not Plus) and I have some question regarding the system.
1/ Why is it that when using `truestate_create_state` the function will trigger `truestate_set_default` ? On top of that `truestate_set_default`will execute the srcipt but, as I'm in the Create Event, I don't want any state's script to be executed.
There's case where it doesn't work. For exemple :
//playerSpawner Manager object inst = instance_create_layer(x,y,"layer", obj_Player) inst.PlayerID = 1 //or whatever value //Player Object - player_state_init function camera = instance_create_layer(x,y,"layer", obj_Camera) camera.viewport = PlayerID
GMS will tell me that PlayerID is not set when it will try to assign `PlayerID` to the Camera's `viewport` variable. It's because `player_state_init` is fired when `truestate_create_state` is called in the Create Event of my new created obj_Player.
But I want `player_state_init` to be fired only when I switch to the Init state.
2/Related to 1/, I think `truestate_set_default` should be split in to distinct function :
- truestate_set_default : where the systeme will rollback to if no state are found
- truestate_set_start : which will be the starting state of the object.
The starting state is usually not the one you want to be the default. For exemple, I would want to launch an "intro" state, like my character walking in screen, but I don't want this state to be the default one during gameplay.
So is it me who get it wrong ? is this a bug or a "flaw" in the system and how can I work around that without doing the Alarm trick ?
Thank you :D