The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Valcos on March 27, 2007, 03:39:18 AM

Title: How do you turn scripts on and off? --->[[RESOLVED]]<---
Post by: Valcos on March 27, 2007, 03:39:18 AM
I have this script that you can modify your characters lvl and what weps and stuff like that in game. I was just wondering is it possible to disable that until a surtain point?
Title: Re: How do you turn scripts on and off?
Post by: Kokowam on March 27, 2007, 11:12:32 AM
Ok. This is a shot in the dark... Add an if statement at the beginning that if OOGABOOGA == true, the rest of the code goes after that. Then add an "end" at the end of the script. Not sure about syntax here and even less sure it will work. XP
Title: Re: How do you turn scripts on and off?
Post by: SiR_VaIlHoR on March 27, 2007, 03:07:29 PM
Not sure...cause no script exist without end in it's lines.
I have an event that stop all script but to stop only one...i'll search to do this.
Title: Re: How do you turn scripts on and off?
Post by: Valcos on March 27, 2007, 05:30:22 PM
Ok, tell me when you find out.
Title: Re: How do you turn scripts on and off?
Post by: Falcon on March 28, 2007, 12:24:39 AM
Either use the SDK (it has an enable/disable thing) or do the following.

Go to the script editor, and make an:
if $game_switches[X] == true
Before everything, and then add an end at the bottom of the script.

It may not work, but that's my best idea.
Title: Re: How do you turn scripts on and off?
Post by: Kokowam on March 28, 2007, 01:00:24 AM
Lol. That's what I was thinking, too XP Then make a call script that turns it off. I think that's how it goes...
Title: Re: How do you turn scripts on and off?
Post by: Falcon on March 28, 2007, 01:12:29 AM
That way would just use switch X.
Title: Re: How do you turn scripts on and off?
Post by: Valcos on March 28, 2007, 01:15:36 AM
Oh ok. MasterMoo I didnt know what you were saying before but i think you said somewhat of the samething. Thanks for covering that up for me ;D
Title: Re: How do you turn scripts on and off?
Post by: Kokowam on March 28, 2007, 01:22:07 AM
Quote from: Darklord on March 28, 2007, 01:12:29 AM
That way would just use switch X.
Oh... Lawl... I just saw that it was a global variable so I just assumed... XD Oh, and sorry I couldn't explain it any better, earlier on. I suck at explaining things...
Title: Re: How do you turn scripts on and off?
Post by: Blizzard on March 28, 2007, 03:03:48 PM
Quote from: Darklord on March 28, 2007, 12:24:39 AM
Either use the SDK (it has an enable/disable thing) or do the following.

Go to the script editor, and make an:
if $game_switches[X] == true
Before everything, and then add an end at the bottom of the script.

It may not work, but that's my best idea.

if $game_switches[X]

is enough.
Title: Re: How do you turn scripts on and off?
Post by: Kokowam on March 28, 2007, 07:46:21 PM
Awww... Blizzard changed his avatar back to what it kind of was before... Anyways, yay! I learned something new! :D Btw, add "[RESOLVED]" to the title.