Advanced Multiple Event Self-Switch Control
Nathanial B.
Introduction
Designed mostly for myself, as I do a lot of puzzles etc. I hate having a bunch of switches to name/scroll through.. Most of them being tied to puzzles that are used once. So I wrote this script that allows you to control self-switches for other events. Even events on completely different maps. There's sound and delay options for effects, if you're able to find use for them.
If anyone here finds use out of it, great. If not, I use it myself so it's self-serving :)
Features
Control other events self-switches (A through D). You can manipulate dozens of event self-switches through one script call command.
Set a timer delay per self-switch being turned on. Useful for puzzles/events, etc.
Two sound options: Repeat sound per switch being affected or play a sound once.
How to Use
Instructions:
You can control other event self-switches by calling any of these commands:
selfA(On/Off, Start Event, End Event, MapID, Wait Time, Sound Effect, Sound Count)
selfB(On/Off, Start Event, End Event, MapID, Wait Time, Sound Effect, Sound Count)
selfC(On/Off, Start Event, End Event, MapID, Wait Time, Sound Effect, Sound Count)
selfD(On/Off, Start Event, End Event, MapID, Wait Time, Sound Effect, Sound Count)
------------------------------------------------------------------------------
Arguments:
On/Off,
Start Event
End Event
MapID
Wait Time
Sound Effect
Sound Count
------------------------------------------------------------------------------
Argument Usage:
On/Off: True for ON, False for OFF
Start Event: The first event to establish the order of events to be affected.
If I want event 37 to be turned on first I would put 37.
End Event: The last event to establish the order of events to be affected.
If I want event 50 to be turned on last (after 37, like above) I would put
50 here.
MapID: The Map ID the events you're manipulating are on. 0 = current map.
Wait Time: Time to wait (in frames) between switches being manipulated.
If I wanted to turn the self-switch on for events 1-10 and have a 5 frame
delay between each self-switch being affected, I would put 5.
Sound Effect: File name of the SE to be played. If I wanted to play the sound
effect stone.ogg I would put "stone". To play no sound effect simply put ""
Sound Count: Should the sound play once for a group, or per switch affected?
Set to 1 for the sound to play for every switch manipulated. Set to 0 for a
sound to play only once for the entire group of switches.
------------------------------------------------------------------------------
Examples:
To turn self-switch A ON for events 1-10 on map 37 with a 5 frame delay
between switches with a sound playing for each switch:
selfA(true, 1, 10, 37, 5, "stone", 1)
You can reverse the order events are turned on by reversing the order of
Start Event and End Event like so:
selfA(true, 10, 1, 37, 5, "stone", 1)
To turn self-switch B OFF for events 27-50 on the current map, with no delay
between switches, and a sound effect playing ONCE for the entire group:
selfB(false, 27, 50, 0, 0, "stone", 0)
To turn self-switch D ON for evets 1-3 on map 82 with no delay between
switches and no sound effect:
selfD(true, 1, 3, 82, 0, "", 2)
In the last example I set Sound Count to 2. This can be any number as long as
it's not 0 or 1. Just make sure it's not left empty :)
Demo
Script
Available here.
Version without sound (reducing arguments to remember):
Available here
Credit and Thanks
- Nathanial B.
Author's Notes
Free for commercial usage, just give credit and let me know the title of your game. :)
Advanced Multiple Event Self-Switch Control
● ARCHIVED · READ-ONLY
-
-
I'm having trouble getting the script to run properly. I placed it under the materials tab like all
other custom scripts. I tried the first version with sounds. The sounds activated perfectly, but the
self switches weren't being triggered. Same with the one without sound. I used a script call
to bring it up in an event: It's a parallel process event with a variable with a timer. The event worked
perfectly before I tried the custom script call. I wanted to use yours for the same reason you made it-
control lots of events easily.
The event is simple enough:
selfA(true, 28, 29, 0, 0) -
The sound argument and sound count argument needs to contain something, even if you don't want to play a sound.I'm having trouble getting the script to run properly. I placed it under the materials tab like all
other custom scripts. I tried the first version with sounds. The sounds activated perfectly, but the
self switches weren't being triggered. Same with the one without sound. I used a script call
to bring it up in an event: It's a parallel process event with a variable with a timer. The event worked
perfectly before I tried the custom script call. I wanted to use yours for the same reason you made it-
control lots of events easily.
The event is simple enough:
selfA(true, 28, 29, 0, 0)
Try:
selfA(true, 28, 29, 0, 0, "", 0)
If you're using the non-sound version, I'm not 100% sure. I've re-tested the script without any issues. Try placing this above any other scripts.