distant turn "false" "true" a runing script

Fridjah

Veteran
Veteran
Joined
Jan 13, 2015
Messages
155
Reaction score
7
First Language
French
Primarily Uses
RMVXA
Hello I'd like to know if it's possible to turn "false/true" as needed.


I guess is a strange question, but I actualy have a script that mess a bit.


so I was wondering when I see all scripts starting like:


($imported ||= {})[:Script_name] = true


If it's like a switch to true/false this script.


If that's possible, explain to me how to do it, just to try in my project


Thanks in advance
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
Are you asking if that line enables/disables the script?  No, it doesn't.  $imported is simply a list of what scripts you've got in your game, and is only used if one script depends on another being present and wants to check to make sure that script is there as well.  You should not change these values.


To enable/disable a script while the game is running, the script would have to be designed and written with that in mind.
 
Last edited by a moderator:

Fridjah

Veteran
Veteran
Joined
Jan 13, 2015
Messages
155
Reaction score
7
First Language
French
Primarily Uses
RMVXA
Well, that's too bad for me.


Thank you
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,635
Reaction score
5,116
First Language
English
Primarily Uses
RMVXA
If you want to turn an entire script off, just type =begin on the first line and =end on the last line of the script (preferably on separate lines from any other code).


If you want to turn a script's functionality off in the middle of your game, there's usually no built-in way to do that.  But an experienced scripter can probably find the lines where your script is "interfacing" with the gameplay and add a conditional branch to your script to only use the script's functionality if, for example, a certain Switch is ON.  So if it's just one or two scripts that you need to do this with, you can probably get someone in the Classifieds to handle it for about $10 a script, give or take depending on the script's length and complexity.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,050
Messages
1,018,548
Members
137,835
Latest member
yetisteven
Top