Can an event have it's own set of variables?

Discussion in 'JS Plugin Requests' started by mimi-min, Apr 25, 2016.

  1. mimi-min

    mimi-min Will draw for food. Member

    Messages:
    16
    Likes Received:
    8
    Location:
    Osaka, Japan
    First Language:
    English
    Primarily Uses:
    RMMV
    I'm currently using Hudell's plugin that copies events from another map to a certain location. I was wondering if it's possible for an event to have a set of variables tied to itself to be used like "properties"; and I don't just mean self-switches.


    For example, if I wanted to know an event's color based on a corresponding number. Or maybe how many times it's been interacted with. Or how many of a variety of fish are in a pond, as opposed to other ponds.


    I know this would be easy if I were only planning on having a few objects; I could just have one global variable for each property of each object. But I'm planning on having several unique events with many different properties. It would be much easier if I could just give them their own private variables so they won't trip over each other when they're created and erased.


    Does this question make sense?


    To put it in a different context when I used to program I could create an object Siamese from a class Cat; it would have variables like noseColor and bodyColor that could be set and get without needing to make a ton of variables for each vaviation of the Cat object from the beginning. I think I just made that more confusing.
     
    Last edited by a moderator: Apr 25, 2016
    #1
  2. Ugouka

    Ugouka Veteran Veteran

    Messages:
    140
    Likes Received:
    53
    Location:
    US
    First Language:
    English
    I get what you're trying to do...but as far as I'm aware, there's no way to do this in the base game, at least. There may be a plugin, but one thing you could do in the mean time is take advantage of the fact that variables come in 20-number long lists. (ie. 1-20, 21-40, etc. etc.) If you just set your max number pretty high and give each event its own bracket in the higher numbers (You can always put a note in the event to remind you which bracket they're in), they really shouldn't bother any other variables, since they'll be way down on the list, and they'll be in their own nice little bracket. So unless you are planning on having over 20 variables per event, that should work for a temporary patch, at the very least. I know it's not exactly what you're looking for, but sometimes a simple solution can work. Hope it helps at least a little.
     
    #2
  3. Shaz

    Shaz Veteran Veteran

    Messages:
    37,706
    Likes Received:
    11,410
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    I've moved this thread to JS Plugin Requests. Please be sure to post your threads in the correct forum next time. Thank you.


    You need a plugin to do this.  There may already be one, so have a search.  What you're after is called self-variables, or self-data.
     
    #3
  4. byBibo

    byBibo Veteran Veteran

    Messages:
    99
    Likes Received:
    210
    Location:
    France
    First Language:
    French
    #4
    mimi-min likes this.
  5. mimi-min

    mimi-min Will draw for food. Member

    Messages:
    16
    Likes Received:
    8
    Location:
    Osaka, Japan
    First Language:
    English
    Primarily Uses:
    RMMV


    Sorry, I didn't know it would have to be a plugin so I posted it in the normal thread. I did some searching but I couldn't really find anything, thanks for giving me some tips; it took a while but I finally found one!



    Yeah, I just found it! Thank you so much :)
     
    #5

Share This Page