You need a state machine to swap things with bulion variables.
Like I have been thinking the smallest such state machine involves one bulion variable, two functions and two pairs of if and else statements.
First you make two functions after you declared your bulion variable and say, if bulion equals true run this function, else run this function, this is the selector with the functions.
Then you need another if an else statement for the variable it’s self that is conditional and turns the bulion on or off true or false.
If I’m here for example turn the bulion on, esle leave it false, and once the bulion turns on it will run the function with true, otherwise the function with false.
So the if and else with the bulion to turn it on or leave it off and then if and else of the functions where these if and else conditions see if it’s on or off then pick the if if true the else if bool is off, you got for if true and else false.
You set it to false initialy that is the defaul value let’s say and turn it on with the conditioning system that is dependant on what is happening, when that switches the bulion on then the other if and else statement will see the bulion is on and run the true if and not the else, when it’s off it will run the else.
And you can run this way variants , versions and so on, you can run if if if if, you can have 100 if’s in one if, I’m just giving an example of simple two state being.
It could be really simple for beging, like with key press, press key turns the Bool var on and the function with else turns off and the other with if turns on, and this is basicly a state machine, a function switch where functions turn off and some turn on and you can have variations of things, like slight offsets, slight difrences on things.
State machine my friend, they have tutorials on complex ones in C++ that I’m trying to grasp
for unreal engine, this is I guess the most basic concept.
If you manage to create variants of things please post here, I would be intrestid too.