• Announcements

    • RagingHobo

      Forum Upgraded!   07/17/2017

      We have successfully upgraded our forum to the latest version! Some things have moved around but don't worry everything is still there, we still need to find updated versions of the plugins we were using previously to restore everything to the way it was. There will be a running topic in the Feedback and Support in case you notice something wrong. Before you do so please clear your browser cache and close your browser completely to rule out a caching issue. Thank you for your patience during the outage and while we get everything back to 150%  
Tsukihime

Event Extend: Page conditions

4 posts in this topic

This script is outdated.

You should use Custom Page Conditions

 

Event Extend

-Tsukihime

 

Overview

 

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.

 

Example

 

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?"

 

Usage

 

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.

 

dMAud.jpg

 

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

 

Download

 

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

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

 

Notes

 

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
oriceles, shaz and yufang97 like this

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

 

5DiKW.jpg

 

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

 

RdpXh.jpg

 

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.

 

dMAud.jpg

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
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.