Daring Tombstone wrote: ↑
Thu Jan 16, 2020 12:17 am
Assuming this what you're asking here's an example.
Pretty simple yeah?
Not quite. The behaviour expected is an unlock, from what I gather. So, instead of putting all the code into onEvent, it would be better to use onEvent to toggle a boolean variable that otherwise gates off the code that runs in other events like onTick (for input checking and logic) and onDraw (if there are any components to draw to the screen).
Setting "canSwitchCharacters" to true in onEvent would be emblematic of the action of "gaining the ability", since it allows the code inside the if statement in other events to execute.
In the spoiler below is a version that permanently sets the variable for the episode, even across levels (MAGLX3 build, PAL build and newer versions only):