Here is what I'd like to do:
You interact with an event, which then causes all events on the current map with name X to flip their self-switch A.
Is there a script-call to do this?
For some context:
I have altars as a gameplay mechanic which allow the player so sacrifice items to gain rewards.
Once you proceed with the sacrifice, multiple torches around the altar are extinguished.
Now, there will be a lot of these torches around each altar, and there will be a lot of altars. So I'd help to make the whole process cleaner without making a lot of copy-pasting.
I am looking for something along these lines:
(Obviously this is not actual code, but rather a logical representation)
You interact with an event, which then causes all events on the current map with name X to flip their self-switch A.
Is there a script-call to do this?
For some context:
I have altars as a gameplay mechanic which allow the player so sacrifice items to gain rewards.
Once you proceed with the sacrifice, multiple torches around the altar are extinguished.
Now, there will be a lot of these torches around each altar, and there will be a lot of altars. So I'd help to make the whole process cleaner without making a lot of copy-pasting.
I am looking for something along these lines:
(Obviously this is not actual code, but rather a logical representation)
Code:
For X (each event) on the current map:
if event.name === "Altar Torch":
$gameSelfSwitches.setValue([CURRENTMAP,X,'A'], true);