Jump to content

Event Extend: Page conditions

Recommended Posts

This script is outdated.

You should use Custom Page Conditions


Event Extend





This script allows you to use conditional branches to act as an additional page condition.

It only supports one conditional branch, but it allows you to specify more things and gives you a script box as well.




You have an event that should only appear if Eric is a Monk.

The easiest way would be to specify a page condition that checks whether Eric is a Monk, but unfortunately such a page condition doesn't exist.


You can solve this problem by cleverly using a set of parallel events to check Eric's class, and then remotely set self-switches to show the proper event page.


...or you can just specify a custom page condition using a conditional branch that checks "Eric is a Monk?"




If your page should have a custom page condition,


1: create a comment as the first command and write "page-condition"

2: create a conditional branch with the condition you want.




The branches themselves are not important. I only check the condition and determine whether the page should be selected.




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

Demo: http://db.tt/5e6hxd0o




An event is not refreshed automatically unless you explicitly tell it to refresh.

I've added refresh calls to a lot of different methods throughout the classes but there may be some I didn't catch. Just report them.

Edited by Galv
  • Like 3

Share this post

Link to post
Share on other sites

Night_Runner over at RRR decided to use a conditional branch to check for activation, which I think is a great idea.


I've updated the script to use conditional branches as well (and also the original "script: .." comment if it's easier for you).


Now all you have to do is do your typical conditional branch and the engine will correctly skip the page if the condition is not met (this allows you to run other pages).


The first conditional branch is used to check whether the page should be used.

It is still going to be checked when the interpreter actually executes the page commands.


Here is an example of why this is useful:

Suppose you have a chest




It doesn't do anything useful by default, but on the second page, you have




So the chest will suddenly turn into a dark chest and take your HP away if switch 1 is ON.


If switch 1 is not on, then the first page will be activated and you see your rest chest.

Once switch 1 is on, it will turn into the dark chest.


Technically, you don't need to put your commands inside the branch if you just want them to execute when the page is activated. You can still do it though; there is no issue.

Edited by Tsukihime

Share this post

Link to post
Share on other sites

I've modified the script to make it more flexible

It changes how the page condition command is specified.


Your first command should be a comment that reads "page-condition"

The second command should be a conditional branch that will be used as the page condition.



Share this post

Link to post
Share on other sites

Locked at OP's request. This script is no longer supported and you should use the new one as stating in the first post.

Share this post

Link to post
Share on other sites
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

Top ArrowTop Arrow Highlighted