Suggestion: Event condition EQUAL TO a variable

Crifmer

Villager
Member
Joined
Sep 18, 2014
Messages
20
Reaction score
1
First Language
English
Primarily Uses
I tried searching for this, but it's very specific and my search-fu turned up lots of hits that wasn't really what I was looking for.

I thought perhaps that it'd be pretty keen if an event condition could be equal to a variable instead of equal to or greater.  I know it would certainly help me write events with greater precision.

I need to keep track of the actor in the party member 1 slot for event purposes.  If I just needed it for in-event conditions, I could do it with just a call to the variable (which I'm still doing), but for some cutscenes, I need to change character graphics depending on who's on first.  So instead of having the events process the variable all at the same time, I'm doing it with page conditions and switches.  It's not so bad, really, but if I could just make the condition equal to a single value, I could use one variable instead of four switches and set the variable in the master event controlling the cutscene instead of calling a common event or putting it in a script.

It's not really that big a deal (yet - I haven't done anything too elaborate yet), but I do think it would be helpful. To me, anyway.

And if there's an efficient way of doing this without scripts, that'd be keen too.

Sorry if this has been discussed before.  My search-fu is not that great.
 

PencilCase27

So, I can write anything I want here... right?
Veteran
Joined
Jun 5, 2014
Messages
33
Reaction score
13
First Language
German
Primarily Uses
If you want a page to be active if a variable is 1, then make it active for greater/equal 1 and add a new page above that is active for greater/equal 2. 
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
Any change to the event conditions would require a change in the editor, and unfortunately that is a no-go.


However, there is a way to use multiple pages for the same effect.


Let's for example assume you want to check if a variable is equal to 5.


Then you make one event page with condition var equal or greater 5, and place the commands there that should happen if the variable is equal to 5.


And then you make an additional page with a higher page number conditioned to var equal or greater than 6.


If the variable is 6, then both page conditions would be fulfilled, but the priority would make the page with the condition 6 or greater active.


The page with the condition set to equal or greater than 5 would only be active if the variable is equal to 5, not if it's greater, because the greater number would trigger the next page.


The only other way to make such a condition would be to use scripts, as you assumed yourself.
 

Crifmer

Villager
Member
Joined
Sep 18, 2014
Messages
20
Reaction score
1
First Language
English
Primarily Uses
Any change to the event conditions would require a change in the editor, and unfortunately that is a no-go.

However, there is a way to use multiple pages for the same effect.

Let's for example assume you want to check if a variable is equal to 5.

Then you make one event page with condition var equal or greater 5, and place the commands there that should happen if the variable is equal to 5.

And then you make an additional page with a higher page number conditioned to var equal or greater than 6.

If the variable is 6, then both page conditions would be fulfilled, but the priority would make the page with the condition 6 or greater active.

The page with the condition set to equal or greater than 5 would only be active if the variable is equal to 5, not if it's greater, because the greater number would trigger the next page.

The only other way to make such a condition would be to use scripts, as you assumed yourself.
I think if I only had one or two pages going on I may have thought of that... I'll keep it in mind, but I've got so many pages and switches in multiple events that I wanted to keep it as simple as possible visually.  I'm also trying to do this with an eye toward readability.  So in this case, I think the common event call and multiple switches is the way to go.

The title of the thread, though, is actually a suggestion for the next iteration of the editor.  I think having a condition able to just be equal to a variable would be a big help.  To be frank (respectfully speaking) there are a lot of options for setting variables and conditions that aren't included that have me scratching my head.  I'm sure it has to do with the way the editor is set up.

Thank you guys for the suggestion.
 

PencilCase27

So, I can write anything I want here... right?
Veteran
Joined
Jun 5, 2014
Messages
33
Reaction score
13
First Language
German
Primarily Uses
If you want some additional help, I usually enjoy looking throught other peoples work and search for ways and methods to simplify eventing and scripting. Maybe I can help to make your events a little bit less complicated or can think of some script snippets to simplify stuff. PM me if you're interrested.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You would also need an earlier page for if the variable is less than 5.


Otherwise, if you have many pages and at some point on several of them you want the sprite to change depending on who is the leader, just do a Call Common Event, and set up a new common event that uses a conditional branch to see if it's actor 5 in the lead and do one thing, else do the other thing.
 

xShoot4WarAmpsx

Veteran
Veteran
Joined
Jul 21, 2014
Messages
32
Reaction score
0
First Language
English
Primarily Uses
Any change to the event conditions would require a change in the editor, and unfortunately that is a no-go.


However, there is a way to use multiple pages for the same effect.


Let's for example assume you want to check if a variable is equal to 5.


Then you make one event page with condition var equal or greater 5, and place the commands there that should happen if the variable is equal to 5.


And then you make an additional page with a higher page number conditioned to var equal or greater than 6.


If the variable is 6, then both page conditions would be fulfilled, but the priority would make the page with the condition 6 or greater active.


The page with the condition set to equal or greater than 5 would only be active if the variable is equal to 5, not if it's greater, because the greater number would trigger the next page.


The only other way to make such a condition would be to use scripts, as you assumed yourself.
That only works for some cases. In the event of making a sequential switch this does not work. If you have four switches that have to be opened in a specific order, If you set the first one to 5, second to 6, third to 7 and fourth to 8, all the conditions are met no matter what order you flip the switch. I dont understand why the conditions area was created so flawed in VX Ace.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
@xShoot4WarAmpsx
For any sequence, you use a variable instead of switches.
The events portrait switches to the player, but the code checks if the switch is in order and then either counts up a variable or not. And the check for switch order is simple: The counting variable has to have the number of correctly turned previous switches.

There are a number of reasons why the conditions on the events have to be limited, but the result is sufficient for almost any case if you are using the correct elements.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,045
Members
137,569
Latest member
Shtelsky
Top