how would I make it so when I set a boolean to true in the editor it makes all other instance set that boolean to false?

For context I’m using this in the construction script, It’s for a checkpoint system, and specifically for setting the level start. I’m trying to get this to work so that I can’t set multiple checkpoints to be the level start.


This is what I’ve got so far.


try

Unfortunately that didn’t work. I think I need to find a way to only reference what is currently being constructed/interacted with so that I can isolate it and then tell everything else to be false. problem is I have no idea how to do that lol

your code should work if you make that Boolean exposed.then place them to the level and choose one of them to tap its “level start” on. that’s how you use the construct script.

If you want to change the Boolean through an event on runtime.then probably don’t write them to construct.instead,use event dispatcher to communicate with multiple actors.

Try a function marked Call In Editor:


Be sure to mark the bool as Instance Editable.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.