RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[VX] Area Variable Event Trigger

0 Members and 2 Guests are viewing this topic.

**
Rep:
Level 82
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:



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
« Last Edit: February 23, 2014, 04:03:07 PM by modern algebra »

**
Rep: +0/-0Level 84
very nice
thank you

**
Rep: +0/-0Level 84
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.

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
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.

**
Rep: +0/-0Level 84
That's... weird... o_O

I found one common event, out of all of them that was causing it.
Thanks

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
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.

********
Licks
Rep:
Level 91
Sexual Deviant
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.