How do I make this random variable thing work? Do I even have to use variables?

Graminoid

Warper
Member
Joined
Jan 11, 2016
Messages
4
Reaction score
0
First Language
English
Primarily Uses
I'm not sure how to word this for search, so if someone else has asked this before, i'd appreciate being sent to that post.

Essentially, i'm trying to make a "Mystery" command for battle, using variables. Essentially, i've been trying to make it so if the "Mystery" command is used in battle, a variable is rolled from 1-X, depending on how many random events can happen in that battle. 

The biggest problem is, it keeps looping!

This is hard for me to explain, so let me link some pictures to show what i'm doing.

[IMG]https://i.gyazo.com/60e1c7923e4e4faa37f1124be6fa4d20.png[/IMG]

[IMG]https://i.gyazo.com/60711105bb6d915838854a312a8b27a5.png[/IMG]

Here are examples of what i'm trying to do. All I can find is a "If variable 0001 is above [x], and Gared uses the [Mystery] command, do y."

The problem is, that can loop the mystery command stuff. Is there some better way of rolling a random event in battle? There must be, as i've seen something like this before.

I really just want a number to be rolled, or some other way for the game to randomly select one of the battle events I set for the mystery command when It's selected in game. Then I want to change it so it cannot be used again in that battle. Anyone have any ideas for this kind of thing?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,640
Reaction score
15,726
First Language
English
Primarily Uses
RMMV
Put it all on a single page, conditioned by the skill being used.


Set the variable, then use a series of Conditional Branches to check what the value is.
 

Graminoid

Warper
Member
Joined
Jan 11, 2016
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Thanks!!! I had totally overlooked conditional branches.

Though I am wondering, how would I lock the player out of mystery after using it once? I tried to use a switch, but it didn't really work. Is there a way to lock the command after using it?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,640
Reaction score
15,726
First Language
English
Primarily Uses
RMMV
You only want them to use it once in the whole game? In that case, just remove the skill from that actor.


If you want them to keep the skill but only use it once during a whole battle, I'm not sure - I don't use 2K3 so I don't know if there's a way to let an actor HAVE a skill but not be able to select it in battle.
 

Graminoid

Warper
Member
Joined
Jan 11, 2016
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Once per battle. I've tried to use a switch, but it didn't work the way I had hoped. I'll tinker around and see if I can get anything to work. If so, i'll post the solution in case someone else has something similar they'd like to do with it.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,640
Reaction score
15,726
First Language
English
Primarily Uses
RMMV
Do you want the skill to be visible even when it can't be used (so after it's been used in battle, and while on the map)?
 

Graminoid

Warper
Member
Joined
Jan 11, 2016
Messages
4
Reaction score
0
First Language
English
Primarily Uses
It's a battle command, basically trying to make it selectable as a command and not a skill. I managed to get it working somewhat, but now i've reached a new problem. I deleted all the items/extra monsters in my list that I wasn't using, and now I can't access battles?

It says event script is referencing an item that doesn't exist, but there is nothing in the event script that references an item? I deleted all the items and it worked, but when I try to make new items it stops working again.

As for my fix, I simply made another conditional branch that was linked to a switch. Once the mystery command has been used, it's locked out until the end of the fight by the switch.
 
Last edited by a moderator:

Latest Threads

Latest Profile Posts

Hi everyone! Enjoying this nice long weekend. How are you all doing? :)
I just successfully tested having events check if specific actors are in a particular party slot and then changing image to match. This will let me make scenes take into account who is in the party at the time and arrange them accordingly - this is important since I'll have extra actors beyond current party. The script used is the same from MV and is compatible with my current core plugin setup in MZ. Thank goodness.
That awkward moment when you're talking about thinking about writing a limited shop stock plugin for MZ and then find out you already wrote one...last May. My memory is so bad.
When I open my project and I'm like, hell yeah.
Some drawings I made in Lapis, one day I intend to involve them in some RPG Maker project.
* maybe two wall frames
*or some sprite flower tiara, or maybe it inspires someone to do something.
bdd19b62e539d17b3b00cc3d63034f7d.jpg

fcca5c8471b34483da8e032cfe579275.jpg

Forum statistics

Threads
118,426
Messages
1,115,863
Members
155,378
Latest member
TrashWizard
Top