Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> [VX Ace] Scripted event page conditions
Tsukihime
post May 26 2012, 05:54 PM
Post #1


Level 25
Group Icon

Group: Revolutionary
Posts: 562
Type: None
RM Skill: Undisclosed
Rev Points: 25




Event Extend
Author: Tsukihime

Overview

Now you can specify page conditions using ruby syntax (ie: script calls)

Features
  • Use a conditional branch to specify page activation condition
  • Supports battle events as well.
  • Use a script call to specify the event condition
  • "Event touch" trigger can now be activated by *any* event

Will be adding some more event-related functionality later, such as expanding the "trigger" condition.

Usage

The easiest way is to just create a "conditional branch" command as the first command on the page, and set the condition there.



Alternatively, if you prefer to use a simple script call, you can use create a "comment" command with the following format

CODE
script: your_formula_here

script: $game_party.leader.level > 5
script: $game_variables[1] == 5


Multi-line scripts are fine as well. Multi-comment scripts won't work though.

I have also extended the "event touch" feature to check *all* events touching.
That means if event1 is walking towards event2 that is activated by "event touch", event1 will also be able to trigger event2.

Download

Script: http://db.tt/5Jd3a133

Note

There is a general issue with how the map works.
If the map isn't refreshed, then the events are not re-checked.
By default, switches, variables, and self-switches will automatically refresh the map, but it doesn't really happen any other time.

I'm not sure how to deal with this besides hardcoding

CODE
$game_map.need_refresh = true


everywhere, which is poor design.
One possibility is to insert refresh calls into every event command that deals with changing parameters, inserting refresh calls into the player to refresh after every movement, etc.

which is kind of silly cause you're refreshing way too much, especially if there are many events.


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   
Tsukihime
post May 27 2012, 02:05 PM
Post #2


Level 25
Group Icon

Group: Revolutionary
Posts: 562
Type: None
RM Skill: Undisclosed
Rev Points: 25




Battle event support added.
The conditional branch takes priority over "Don't Run"


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 25th May 2013 - 08:17 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker