RicoRob

Veteran
Veteran
Joined
Apr 28, 2016
Messages
62
Reaction score
4
First Language
Portuguese (Br)
Primarily Uses
RMMV
(I'm sorry if such plugin already exists, I really couldn't find it. :frown:)

Would it be possible to have a plugin that turns predetermined Switches ON as soon as the game starts/loads/during playtest?
I know I can do that manually with an event, but what I mean is, turning a Switch ON automatically, without having to set up an event/variable/whatever.

Noob question: Would it be problematic (impact performance or something) to have a plugin like that running all the time, checking for those Switches non-stop, during all scenes?

Any help would be appreciated.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,112
Reaction score
1,566
First Language
Dutch
Primarily Uses
RMMV
to start the game with some switches ON or playtest doesn't require a plugin.

you simply make a autorun event and put the switches on you want to be on on the start (or starting map).
use a selfswitch to a blank page and thats basicly it.
 

Tai_MT

Veteran
Veteran
Joined
May 1, 2013
Messages
5,545
Reaction score
5,007
First Language
English
Primarily Uses
RMMV
I'd have to agree with @ShadowDragon here. It's just going to be far easier for you and less resource intensive to have an auto-run event flip all the switches the moment the first map loads in and then flip a page so the auto-run event doesn't keep activating.

It doesn't even take that long to set it up.

Then, all you need to do, is anytime you need to check if those switches are on or off is to have a conditional branch in an event (common event, or interactable event) that checks for the switches being on.

Also, yes, it lags the game to have the system checking constantly for something. If I remember correctly, the program itself will "check" if something is true about 30 times a second. That is to say, it would check if your switches are "on" 30 times each second of real time. It is often better to just have the program check at specific points. Like say, you activate an event by clicking on it. Or, some cutscene calls for the program to check it and check it just once.

You don't want to be checking for it constantly. It'll cause some problems.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,580
Reaction score
1,956
First Language
EN
Primarily Uses
RMMZ
Event page conditions are checked following a possible change in a page condition, i.e. whenever a switch is toggled, a variable changes value, an item is gained/lost, etc. Autorun/Parallel trigger events will attempt to start once per frame as long as they're not already running (which is why Wait commands are often highly recommended in those situations); RMMV runs at 60 fps by default.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,873
Reaction score
14,702
First Language
English
Primarily Uses
RMVXA
While a plug-in could be made, you will have to still set it up and tell it which switches to turn on, and honestly that will probably be as much work as the autorun event, if not more so as in a plug-in you can't see what you've named the switches so you;ll have to keep checking those too to make sure they are correct.
 

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
166
Reaction score
294
First Language
English
Primarily Uses
RMMV
I'm going to have to disagree with some of the posters above. While putting an autorun event on the start map works fine, when testing the game it's often convenient to move the player start location a bunch. But if you move the start location to a different map, your setup event never runs.
This is something I wanted too, so I decided to make it.
The plugin will set up two variables, one will only be set if you're in playtest. The gamestart switch can be used to trigger a common event and do the rest of your setup.
 

Attachments

  • dread_newgame_switches.js
    623 bytes · Views: 11

RicoRob

Veteran
Veteran
Joined
Apr 28, 2016
Messages
62
Reaction score
4
First Language
Portuguese (Br)
Primarily Uses
RMMV
I'd have to agree with @ShadowDragon here. It's just going to be far easier for you and less resource intensive to have an auto-run event flip all the switches the moment the first map loads in and then flip a page so the auto-run event doesn't keep activating.

It doesn't even take that long to set it up.

Then, all you need to do, is anytime you need to check if those switches are on or off is to have a conditional branch in an event (common event, or interactable event) that checks for the switches being on.

Also, yes, it lags the game to have the system checking constantly for something. If I remember correctly, the program itself will "check" if something is true about 30 times a second. That is to say, it would check if your switches are "on" 30 times each second of real time. It is often better to just have the program check at specific points. Like say, you activate an event by clicking on it. Or, some cutscene calls for the program to check it and check it just once.

You don't want to be checking for it constantly. It'll cause some problems.

:eek:... I see. I will keep the auto-run event then.

(I might use Nyanak's plugin for playtesting. It can be really useful.)

Thank you all so much! :wink:
 

Latest Threads

Latest Posts

Latest Profile Posts

Come, join Move That Box! DISCORD!
Feel free to check out our "Touch the Stars" gamejam submission, "Starlight, Starbright!"
just finished playing one shot. im kinda disappointed with return the sun ending ngl. i was hoping there would be some after credits scene that would play with my emotions
So apparently the surprise Google Search page browser game saves your progress when you close the browser.

This really makes me miss the golden age of Flash gaming.
ohh man im ending oneshot now (im doing the last stepping puzzle rn) and the music is so...sad...like...ive been thinking recently about how fast moments pass and...my anxious thoughts combined with that music and nostalgia...like...im comfortably sad...and want to cry internally

Forum statistics

Threads
113,560
Messages
1,075,830
Members
147,556
Latest member
rozmirp
Top