Enemy Events

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

enemyEvents1

This script allows you to create “enemy events”. Whenever an enemy appears in battle, the enemy’s event pages are added to the current troop’s event pages.

The purpose of this script is to allow you to create an enemy’s events once and then re-use it in multiple troops without having to duplicate event pages yourself.

Furthermore, not only can you re-use your event pages, but the pages are only added to the current battle if the enemy actually “appears”. This means that if the enemy was initially hidden (through appear halfway), the pages are not added until the enemy appears.

Download

Script: download here

Installation

In the script editor, place this script below Materials and above Main

Usage

Creating Enemy Events

Enemy events are just regular troop events, except they will be added to the current battle if the enemy is present.

All of the event commands can be used as usual.

Assigning Enemy Events

Enemy events are created as troop events. To indicate which troop should be
assigned as an enemy’s event, note-tag an enemy with

<enemy event: ID>

Where ID is the ID of the troop whose event pages will be assigned to the
enemy.

Referencing Enemies

A special feature to this script is that you can actually reference the enemy
in your enemy events. Simply add the enemy to the troop, and then create your
event commands. When an enemy appears in battle, the indexes of all of its
event pages commands will be updated to point to the enemy’s current index.

For example, suppose you want to “change enemy state” for a slime at the
beginning of the battle. In your enemy event, you would add your slime to the
screen, and then create your command and point to the slime.

When you start a battle where the slime appears, the change state command will
correctly update itself to point to the slime.

Note that you can only reference the enemy that the pages are being assigned
to, so even if you add two slimes to the screen, that would not change how
the script behaves.

enemyEvents2

Merging Enemy Events

When a battle begins, all enemy event pages will be added to the current battle. For example, if your slime has two event pages, then those two event pages will be added to the current troop. If the battle has two slimes, then each slime will contribute its own event pages to the battle, resulting in four additional pages.

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

You may also like...

Leave a Reply

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax