Check who's using a skill or item?

● ARCHIVED · READ-ONLY
Started by MakeAndCreate 8 posts View original ↗
  1. Is there a script call for checking the id of an actor when using a skill or item, or checking the id of the target?  
  2. not unless you use one of the scripts/plugins that add that info into the engine - by default it's not stored due to the process how the skills are handled (data vanishes after the skill), which means that you can only get that info by script call at specific parts of the engine..


    For simple solutions people usually mark the user and target with invisible states and then check which actor/enemy has that state with conditional branches.


    If you'll need the information more often, you should search for the scripts on the master script list.
  3. It depends when you make your call.


    The user's data is stored on the Game_Action object. If you can access the Game_Action object, you can access the user of the action... but this would require complex coding that out of context would have no meaning at all.
  4. I had to do something similar once.


    I wanted to know who ate what outside of combat to make the character comment on the food.


    I think the easiest way was to make so the item/food put the state "eating" on the target/user and launch a common event which made the switch "SomeoneIsEating" = ON. Then another common event with a parallel trigger tied to the "SomeoneIsEating" switch was looking with conditional branches which character had the state "eating".
  5. @FuzzyDemon you don't need a second common event or a parallel process for that, you could check the state directly in the first common event launched by the skill.
  6. Andar said:
    @FuzzyDemon you don't need a second common event or a parallel process for that, you could check the state directly in the first common event launched by the skill.



    I agree, but I wanted it to happen only once the menu exits and without having a permanent parallel event running. I should have specified that. :B
  7. that is also automatic - unless you installed a menu interpreter script, by defaults the game_interpreter for the events only works on maps so the CE's are on hold in all scenes until you're back to the map. The only exeption is the battlescene because that also has the game_interpreter active for the troop events.
  8. Andar said:
    that is also automatic - unless you installed a menu interpreter script, by defaults the game_interpreter for the events only works on maps so the CE's are on hold in all scenes until you're back to the map. The only exeption is the battlescene because that also has the game_interpreter active for the troop events.

    Good to know, I'll keep this in mind next time I have to do something like that! Thanks. :3