Have a common event trigger a skill (RPG Maker VX Ace)

Hey!


So I have this problem:


A character has a skill to analyze an enemy's MaxHP. Before she joins the party you can call her in battle via an item (which has its own Common Event that triggers the Analyze Common event if it's in battle). However, when you use the item instead of the skill you lose the ability to choose an enemy to analyze and she'll just analyze the first in the troop. I figured the way I could avoid this is have the Item's Common Event check whether it's in battle and then just trigger the analyzing skill as opposed to the analyzing common event. Because the choosing ability comes from the skill, not the event, after all.


Is there any way to do this?


Or is there any other option to get the ability to choose the enemy back?


Thanks in advance!
Why do you need to check if the item is used in battle? Why not just set it to be usable only in battle?


Does the analyze skill also use the analyze common event? If yes, then it means you have been able to save the target of the skill so that the analyze event can capture it.. If that's the case, then as long as your item is set to target an enemy then the same process flow should work.


Or if the analyze skill runs a code, you just need to make the item target an enemy and also run that code.
Why do you need to check if the item is used in battle? Why not just set it to be usable only in battle?


Does the analyze skill also use the analyze common event? If yes, then it means you have been able to save the target of the skill so that the analyze event can capture it.. If that's the case, then as long as your item is set to target an enemy then the same process flow should work.


Or if the analyze skill runs a code, you just need to make the item target an enemy and also run that code.



I have to check whether the phone is used in battle because it has different functions outside of it. 


The Analyze skill does use the common event and yeah I managed to save it via IDs in Troops. 


If I set the item to target an enemy could I even use it outside of battle? 


EDIT: Alright I just tried it and it works this way. Can't believe I never thought to do it. Thanks a lot!!!
A lot depends on how you made it work - there are several parts of your description that do not fit together because you leave too much out from your specific case.


Can you post screenshots of the item and the common events it calles - then we can sort out what you do why, and might be able to point you to a better solution.
A lot depends on how you made it work - there are several parts of your description that do not fit together because you leave too much out from your specific case.


Can you post screenshots of the item and the common events it calles - then we can sort out what you do why, and might be able to point you to a better solution.



I already made it work, thank you though 🙂

Original thread: https://forums.rpgmakerweb.com/threads/have-a-common-event-trigger-a-skill-rpg-maker-vx-ace.73418/