Hello!
I was advised to seek help on this forum from RMXP script specialists.
I have a question. As you know, different RGSS scripts could be incompatable with each other. Sometimes you want to use several battle or menu systems in the game but you can't do 'cause of that.
So I've thought what of you'll make a "pocket" for each script? I.e. analogue of "Conditional Branch" command in events. Like when certain switch is turned on, script is working. If switch is turned off, so is a script.
I thought it could be done easily and tried to move code fragments from scripsts where this method is realised. But this attempt was unsuccessful, besides i don't actually get RGSS. I only get that in script should be line like "SWITCH_ID = 25" where "25" is ID of the switch. I discussed this with a person who's versed in this kind of stuff. And he proposed that "pocket" should look like this:
SWITCH_ID = 25
if ($game_switches) #If switches do exist
switch = $game_switches[SWITCH_ID]
if (switch == true)
(any possible script)
end
end
But in practice it doesn't work. It causes game shut down and error message. That person said that this method won't be workin with any complex script 'cause with any induvidual script you need use individual block modeles. I.e. you need you to look how certain is looks and going by it you need alter pocket code which makes it very difficult task.
I disagree with it. I'm sure there's a way to write universal script for a pocket in which you could place script of any complexety and bind it to working game switch.
Is it true? Does such script exists?
Help me please to solve this problem. i'm sure not only me but many developers would thank you for it.