RPG Maker Forums

ImaginaryVillain
ImaginaryVillain
Technically it can with a script command. Though the script command is so bad in RM, I usually make a function in a plugin and just call that instead. :LZSwink:
TheGentlemanLoser
TheGentlemanLoser
what do you mean by "switch statements" exactly?
ATT_Turan
ATT_Turan
@ImaginaryVillain How would a script command be able to function as a switch statement?
ATT_Turan
ATT_Turan
TheGentlemanLoser
TheGentlemanLoser
okay I actually understood that! (which is rare for wikipedia articles on technical topics they're often pretty impenetrable). so its functionality is essentially that of the "conditional branch" event command, just less inefficient whatwiththe huge nests of #plzkillme if statements. thanks.
ImaginaryVillain
ImaginaryVillain
Script commands accept any javascript, so you just put it in there like anything else. The only thing to remember is each script command is it's own scope, so variables declared in one don't pass to the next unless they're tied to something persistent.
ATT_Turan
ATT_Turan
@TheGentlemanLoser Yes. It's particularly useful when you have a number of cases that will do the same thing, because instead of having to make it a conditional script with an ever-expanding list of or, you just add the switch case where you need it.
ATT_Turan
ATT_Turan
@ImaginaryVillain Sorry, I just don't understand what you're describing. Are you saying I can enter a switch statement and lists of cases lower in the event as script commands, and it will work? I really doubt that, from how the event editor is structured.
ImaginaryVillain
ImaginaryVillain
You have to put the entire switch statement in a single script command as it's block scoped. So information with in it won't exist outside of it unless you tie that information to something persistent, like a
$gameVariables.value(#). Every event editor command is tied to JS, so you can use their function calls and do whatever you want really.
ATT_Turan
ATT_Turan
@ImaginaryVillain I understand what you're saying...but at that point, you have to script everything in it, with no access to the convenient event commands. So yes, your original comment was right, that's not really more convenient than busting out to a plugin.

Latest Threads

Latest Posts

Latest Profile Posts

Quite the versatile cast so far :p

chars.PNG

Edit: Sprites are made by Alexdraws and TheMightyPalm. I just edited them.
Degica Games Turn Komodo | RPG Maker News #77

Well, rats. Was really looking forward to trying out FPS Creator, but trying to install and set it up was pretty much impossible for my tiny brain to comprehend. So much for that, then.
Ah, home once more! I think I can safely work on my games now.
Let's hope power remains on for the day

Forum statistics

Threads
112,414
Messages
1,068,138
Members
146,068
Latest member
Oiram19
Top