Help - Search - Members - Calendar
Full Version: [VX Ace] Scripted event page conditions
RPG RPG Revolution Forums > Scripting > Script Submissions > RGSS3-Submissions
Tsukihime
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.
Tsukihime
Battle event support added.
The conditional branch takes priority over "Don't Run"
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.