RPG Maker Forums

Hello, and thanks for clicking on my post. I am stuck with the following:

I'm designing a rougelike game and will be using a random number generator (the one built into MV's variable controls) to choose dungeon floors, item tables for shopkeepers, and loot for treasure chests. Rather than having 100 "if" statements for each, I'm going to use switch statements.

I have some code writing experience, but not any with javascript specifically, and I am new to the concept of a switch statement.
I've got as far as passing (or maybe just "trying to pass") some information from the engine to this code:

switch(i = $gameSwitches.Value(2)) {

case i === 0:

break;

case i === 1:

break;

}

Problem number 1:
I don't know whether what I have here would work or not. I've tried running it and all it's done so far is tell me that "undefined is not a function" and mention yanfly's absorbtion barrier plugin in the error message for some bizzare reason. I've tried turning the plugin off, but that just moved it up from the bottom of the plugin list to the next highest plugin up. Why is it referencing my plugins at all? What have I failed to define?

Problem number 2:
Even if I can send info from the game to the script I'm writing, I don't know how to send info the other way. I know I'm supposed to write something between "case i === 0:" and "break;", but I have no idea what that something is. That's more of a general question, I know, but hey, when you're as stuck as I am, it's a good idea to ask a lot of questions.

Whatever feedback you can provide is deeply appreciated. Thanks for reading to the end :)

Latest Threads

Latest Posts

Latest Profile Posts

He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!

Forum statistics

Threads
106,035
Messages
1,018,459
Members
137,821
Latest member
Capterson
Top