Jump to content


Photo

Common Event

effect

  • Please log in to reply
3 replies to this topic

#1 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 30 October 2012 - 06:33 PM

Effect: Common Event
-Tsukihime

This effect calls a common event.

Same as the built-in common event effect, except this supports common event arguments, keeps track of who called it, who it was targeted at, and which item was used to call it.

Download

Script: Download here
Required: Effect Manager

Usage

Tag your item/skill with


<eff: common_evt id arg1 arg2 ... >

Where
`id` is the ID of the common event to call
`arg` is some argument to store, which can be retrieved in the common event

The following variables are available for the common event. You should use script calls to work with these.
 
$game_temp.event_user - who called it
$game_temp.event_target - who it is applied to
$game_temp.event_args - list of arguments provided
$game_temp.event_item - item that was used to call this

The main problem with common events is that, while it's nice, it is basically a function with no parameters.
This script attempts to make common events more flexible by allowing you to indirectly pass arguments to it.

Note that the event arguments are actually evaluated when the effect is called. This means you can say something like
 
<eff: common_evt 1 self.class.id>

And it will store the target's class ID as an argument for the common event.
I am not sure if this will be useful, but you are likely more creative than me.

An example usage might be something like this: http://www.rpgmakerv...l-requirements/

Edited by Tsukihime, 09 March 2016 - 10:57 PM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#2 Ravenith

Ravenith

    Abandoning projects since 2001

  • Member
  • 104 posts
  • LocationGreece
  • RM Skill - Designer

Posted 31 October 2012 - 04:37 AM

Scripter of the Year 2012. You deserve it. Another gem of utility - just think of the possible combat effects with this! Plus, cookie for the arguments!

#3 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 31 October 2012 - 05:34 AM

I changed the script to use the tag "common_evt" instead of "common_event" since it is already reserved by the default engine.
All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#4 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 02 November 2012 - 09:17 AM

I've added some convenience methods in Game_Interpreter so that in your script calls (in your events) you can just say

event_target
event_item
event_user
event_args

To access them rather than the lengthy

$game_temp._____

Because I might not store them in $game_temp in the future....
All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users