How to change behaviors on a character between levels?

so like i have this double jump feature which requires raycast and set it to that floor for that level. so if i where to use the same character, how would i change behaviors on that level but not the other one?

You could make it so that there is a RayCast or a Proximity behavior and make it activate a new bundle and deactivate the old bundle (I don’t know how to activate or deacivate bundles.)

Ok, here’s what you need for it:

  • Behaviors:
    • Toggle Switch/Router (I would recommend you to use Router so you can have as many output to select as you want).
    • Switch.
    • Once
    • LoadLevel.
    • Number.
    • Message.
    • Mailbox.
    • Filter.

An object that has the least code in it.

Now, you need that object to use behavior those to send signal to your character to let that toggle switch/router change the output gate to disable/able double jump by:

In object: Use Once to wire the output to “get” of the LoadLevel, wire LoadLevel’s output at the bottom to “set” and “get” of the Number, then wire output of Number behavior to Message, set the Message to “Choose objects to send to” and select the name of your character. Don’t forget to rewrite the Message at the top and have to be the same as the Mailbox in your character’s Behaviors’ section, so the signal it send to would not mess up.

In your character: Use the Mailbox that you rewrited and have the same text in the Message that we did on other object, now wire the Mailbox output to “in” input of the Filter, depend on the level you working on, it will have different number that you can check in Game Levels at the bottom of your editor screen. Set the Filter as “equal to” at the top of Filter, and replace the “0” to the number of the level you want the character can double jump, double slash, etc… In this part, I will separate into 2 different ways for different behaviors, you can take a look at the image below.

Red circle: for the other object I talked about.
Yellow circle: best for turn on/off 1 mechanic of each level, if you create more of them, it could be a bit messy but could still work fine.
Green circle: for turn on/off multiple mechanics of each level.