Actor-Specific Item Effects

● ARCHIVED · READ-ONLY
Started by pixie12donanobis 8 posts View original ↗
  1. Actor Specific Item Effects

    Summary
    I'm trying to get an item to affect different actors... well, differently. I want each actor to have a unique response to the item when it's used on them.

    Details
    In my game, one of the key items is a teddy bear. I want each character to talk to it when used on him/her from the menu. Basically, here's what I'm looking for in the script:

    • Go into the menu.
    • Select the item.
    • Use the item on any character.
    • When the item is used on Character A, she will say something that is specific to her.
    • When the item is used on Character B, he will say something that is specific to him.
    • When the item is used on Character (X), they will say something specific to them.
    That's really all I'm looking for. It seems simple enough, but I haven't been able to find it anywhere.

    There's a feature similar to this in Final Fantasy 7  (only place I've ever seen it) when trying to teach limit breaks from items: when you use one on a character who can't learn the limit, each one says something different about the item (additionally, when used on the right character, if their level is high enough, they'll learn the limit. That's not what I'm looking for now, but it would possibly go nicely with the script and/or give you a better idea of what should happen).

    The bear is not consumable, nor is it equipment, though it could be either of those things if it must. Ideally, it should remain just a key item.

    I am not looking for class restrictions, skill restrictions, weapon restrictions, etc. I'm not even really looking for actor restrictions; I want everyone to be able to use it, but with varying effects based on who uses the item/on whom the item is used.

    I've searched somewhat extensively, finding a number of different scripts that just weren't quite what I was looking for. If you think you have a script or know of one that will do what I'm asking, I'd be happy to check your suggestion, but please make sure we're all on the same page as to what the script is supposed to do.

    Additionally, as I know about as much Ruby as I know German (I know three words in German), step-by-step instructions on installing the script would be greatly appreciated.

    Thanks bunches!
  2. You can use formula effects

    <formula effect>if a.id == 1 # do something for actor 1elsif a.id == 2 # do something for actor 2elsif a.id == 3 # do something for actor 3end</formula effect>On the other hand, if you prefer common events, you can use Common Event Variables and have your item call the common event.Then in the common event you would have conditional checks on the item target's ID and determine what to do from there.

    The target's ID is stored in a variable that you designate in the script configuration.
  3. I'm trying formula effects, and I've run into an issue: everything works perfectly, except the text doesn't display in the menu; I have to exit, and the text displays on the map screen. Is there a way to display the text inside the menu?
  4. Question on that...is a.id always the way to tell who used the item? I've been going crazy trying to implement something similar in my game for an item used, and been having trouble figuring out how to store who used the item in a variable.
  5. For actors, storing the ID is the most accurate since you can guarantee they will uniquely identify someone.
  6. That's perfect, it all works just like I want now! Thanks~! You're amazing!
  7. Wouldn't be much easier to make just common event whith defining every singl characters reaction

    by conditional branches?

    -Edit-

    I just discovered it will be much more difficult or even impossible... Neverminde than...

    -Edit II-

    I just discovered that it won't be problem by using States... I think : D

    (Thats why I have this signature)