The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX => VX Event Systems => Topic started by: Palsa on September 10, 2010, 02:53:42 AM

Title: [VX] Area Variable Event Trigger
Post by: Palsa on September 10, 2010, 02:53:42 AM
This is just a little trick that I figured out while trying various things with variables in VX, so it's not anything extra special.
Now, I'm sure that a lot of people are already well aware of how to do this, but I figured that it might be helpful to those that are not entirely sure as to how useful variables can be.

Note, that all you really need for this is a variable bound to Map X and a variable bound to Map Y, but I suggest adding all of these anyway, if you choose not to, then just ignore the rest.

Create a common event called Debugging.
In the common event, places the following control variables, note: that the variable ID is entirely up to you.
Bind a control variable to: Character: Player> Map X.
Bind a control variable to: Character: Player> Map Y.
Bind a control variable to: Character: Player> Direction.
Bind a control variable to: Character: Player> Screen X.
Bind a control variable to: Character: Player> Screen Y.
Bind a control variable to: Other: Map ID.
Bind a control variable to: Other: Party Members.
Bind a control variable to: Other: Gold
Bind a control variable to: Other: Steps.
Bind a control variable to: Other: Play Time.
Bind a control variable to: Other: Timer.
Bind a control variable to: Other: Save Count.
Create the following variables for every actor that may join your party:
Bind a control variable to: Actor: Actor ID> Level.
Bind a control variable to: Actor: Actor ID> EXP.
Bind a control variable to: Actor: Actor ID> HP.
Bind a control variable to: Actor: Actor ID> MP.
Bind a control variable to: Actor: Actor ID> MaxHP.
Bind a control variable to: Actor: Actor ID> MaxMP.
Bind a control variable to: Actor: Actor ID> Attack.
Bind a control variable to: Actor: Actor ID> Defense.
Bind a control variable to: Actor: Actor ID> Spirit.
Bind a control variable to: Actor: Actor ID> Agility.
Set the Common Event to Parallel Process and make sure that it is activated early on in the game so that you can use all of these variables.

Basically, if the Player's Map position is X: 24, Y: 15, then the variable for Map X will be set to 24 and the variable for Map Y will be set to 15.

Here is a quick example:
Create an event on the map, set it to parallel process.
Create a conditional branch with the variable for Map X, set the constant to 'Greater then or Equal to': 8, and have 'Set handling when conditions do not apply' checked.
Inside that conditional branch, create another conditional branch with the variable for Map X, set the constant to 'Less then or Equal to': 14, and have 'Set handling when conditions do not apply' checked.
Inside that conditional branch, create another conditional branch with the variable for Map Y, set the constant to 'Greater then or Equal to': 5, and have 'Set handling when conditions do not apply' checked.
Inside that conditional branch, create another conditional branch with the variable for Map Y, set the constant to 'Less then or Equal to': 10, and have 'Set handling when conditions do not apply' checked.
Place whatever you like in the last conditional branch, I'll just have it set to Tint the screen Red.
Under all 4 Else's, I'll have it set to reset the screens Tint to default.

We just created an area variable event box with the following coordinates:

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fthebenevolent.net%2Fimghost%2Ffiles%2Fy7o0ltzdzmo5q8yz7bh8.gif&hash=fd45fade0d96db1cb94496bdbc18520962c137e2)

When the player walks on the event box, the screen will tint to red, when the player steps outside of the event box, the screen returns to the default colors.
This has several advantages over the original Player Touch and Event Touch triggers, for one thing, with this you will only need one event, where Player Touch and Event Touch require a different event for every location, which can cause lag.

I hope that this can be of some use. ^_^

[Edit]

I think I probably posted this in the wrong place, sorry about that. O_o
Title: Re: Area Variable Event Trigger
Post by: Charbel on November 25, 2010, 10:44:27 PM
very nice
thank you
Title: Re: Area Variable Event Trigger
Post by: Organ House on December 18, 2010, 04:51:43 PM
This never works for me, the common event and the even on the map are both set to parallel process, but the game keeps freezing whenever I call the common event or set the event switch to turn on.
Title: Re: Area Variable Event Trigger
Post by: Grafikal on December 18, 2010, 05:11:41 PM
You obviously have something set to Autorun instead of parallel process. It doesn't matter if it's the common event or not, but if anything is autorun ever, the game will freeze until that specific event is turned off.
Title: Re: Area Variable Event Trigger
Post by: Organ House on December 18, 2010, 05:21:51 PM
That's... weird... o_O

I found one common event, out of all of them that was causing it.
Thanks
Title: Re: Area Variable Event Trigger
Post by: Grafikal on December 18, 2010, 06:52:07 PM
The only upside to using Autorun over Parallel Process I can think of for an average use would be for cut scenes as it makes certain that your actor or events can't move while the single event that is on Autorun controls the scene. That and maybe wanting to make sure in some way to have all other events freeze while something is occurring.

I hear that Autorun events process faster or start processing faster than Parallel Process events or something like that. I'm sure MA knows a lot more about this than myself.
Title: Re: Area Variable Event Trigger
Post by: Forty on January 06, 2011, 01:55:12 AM
The only upside to using Autorun over Parallel Process I can think of for an average use would be for cut scenes as it makes certain that your actor or events can't move while the single event that is on Autorun controls the scene. That and maybe wanting to make sure in some way to have all other events freeze while something is occurring.

I hear that Autorun events process faster or start processing faster than Parallel Process events or something like that. I'm sure MA knows a lot more about this than myself.

The first comment is true, but I'm not sure about the second.

What I have done for some cutscenes I do is have two different sets of characters moving. For example, some kind of party is happening on the parallel process while text is being read in the auto-run event. Whenever I reach close to the end of the auto-run event it pans over to a specific individual who walks away from the crowd. If you can harness the ability to use auto-run and parallel processes at the same time, your options for cutscenes will greatly expand.