Converting Plugin Parameters to Methods

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
I was wondering if there is a way to convert the Plugin Parameter into a method. As I've understood, parameters are considered (everything) as strings. So, I would like to know, if in the Plugin Parameters, I had something like:

Scene_Boot

I want that to be a method, rather than a string, so I can pass it via SceneManager.push(parameterHere).

Thanks in advance.
 

LTN Games

Indie Studio
Veteran
Joined
Jun 25, 2015
Messages
704
Reaction score
631
First Language
English
Primarily Uses
RMMV
You could do a conditonal for what the param string is and make a seperate variable to handle the method like what I did below. Unless I'm not understanding you correctly.

Code:
if(param === 'Scene_Boot'){  this._paramScene = Scene_Boot;}SceneManager.push(this._paramScene);
 
Last edited by a moderator:

Heartbreak61

Wandering Noob
Veteran
Joined
Sep 5, 2012
Messages
187
Reaction score
90
First Language
Indonesian
Primarily Uses
RMMV
Use eval() maybe? Or if you hate eval, you can use conditional like mentioned above.
 

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
424
Reaction score
171
First Language
Dutch
Primarily Uses
RMMV
Use eval() maybe? Or if you hate eval, you can use conditional like mentioned above.
I agree with that. But it would only be for 'advanced users' then. But using an eval would be best in most cases.
 

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,070
Members
137,577
Latest member
SadaSoda
Top