Author Topic: [XP] Enemy Event Trigger Condition Checking  (Read 3323 times)

Online KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3041
  • LV: 372
  • Gender: Male
  • Bringer of Salt
    • View Profile
[XP] Enemy Event Trigger Condition Checking
« on: August 12, 2012, 10:28:30 AM »
Enemy Event Trigger Condition Checking
Authors: KK20
Version: 1.01
Type: Event Modification
Key Term: Blizz-ABS Plugin

Introduction

Blizz-ABS allows the creator to make event triggers for map battlers. It was possible for players to allow multiple triggers for one event page, meaning that the events would run if any ONE of those triggers was satisfied. With this script, the creator can now make conditional branches for each trigger.

Features

  • Allows enemy events with multiple custom event triggers to have conditional branches, meaning more diverse event customization
  • No configuration required!

Screenshots

(click to show/hide)

Demo

None.

Script

Post below the Blizz-ABS scripts.
(click to show/hide)

Instructions

Details found in the script. Primary script call is
Code: [Select]
$game_map.events[@SELF].triggered?(trigger_id, object_id)where ‘trigger_id’ is the trigger type (BlizzABS::CETActionButton, BlizzABS::CETWeapon, etc.)
      ‘object_id’ is the ID of the item in the database (Weapon ID, Item ID, Skill ID, Enemy ID)

Compatibility

This is for Blizz-ABS, so make sure to have Blizz-ABS!
Written during the time of Blizz-ABS Version 2.84.
Overwrites a few methods in Map_Enemy regarding to event activation. I’m pretty sure there aren’t any scripts out there that modify these methods, so it should be fairly compatible.  

Credits and Thanks

  • KK20 - For creating the script
  • Sin86 - For the idea/inspiration/bug report

Author's Notes

dat script name :V: Also my first ever submitted script here. Wooo!
Feedback or ideas are appreciated. If winkio approves it, this might be an official feature for Blizz-ABS in the future. Until then, have fun with this. :)
« Last Edit: October 27, 2012, 05:46:33 AM by KK20 »



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Offline Sin86

  • Transcended Spirit
  • ***
  • Posts: 153
  • LV: 1
    • View Profile
Re: [XP] Enemy Event Trigger Condition Checking
« Reply #1 on: October 23, 2012, 06:52:11 PM »
Very awesome script, except I'm having a few issues with enemies and variables.

I'm trying to make a room to where you have to kill all enemies and each variable represents an enemy killed. For example, a room with 3 enemies. To get out, you have to kill all 3 enemies.

On each enemy, I set a variable with a constant +1. However, as soon as I kill that enemy that has that variable, the game locks up and freezes.



I posted this in the Blizz ABS thread but deleted the post after experimenting to see if any external scripts were causing this and apparently this one, sadly is causing it. Also, this happens even if the triggers aren't being used, yet happens as long as the script is installed. Any way to fix it?
« Last Edit: October 23, 2012, 06:56:26 PM by Sin86 »

Online KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3041
  • LV: 372
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Enemy Event Trigger Condition Checking
« Reply #2 on: October 24, 2012, 01:07:42 AM »
I found out what the problem is, but I'm going to have to research it a bit more. It's been a while since I've done this script and I kinda forgot what I did.

Anyways, a temp fix, find def start in my script and make it look like so:
Code: [Select]
  def start
    # if event code exists
    return if @list.size <= 1
    # set starting and execution flag
    @starting = @execute = true
    @trigger = 1
  end
It has something to do with @trigger. I'll try and get this updated.



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Online KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3041
  • LV: 372
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Enemy Event Trigger Condition Checking
« Reply #3 on: October 27, 2012, 12:53:24 AM »
Updated to 1.01



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server