Hello,
I have a question, but most of it I figured out on my own.
Knowns
For a basic Antidote item a common event that checks if the target user has the poison state is called:
$game_party.target_actor.states.include?($data_states[2])
It then shows text user was healed along with a sound effect. (if the antidote is listed as non-consumable a flag that removes 1 antidote is implemented)
Else condition says "Nothing Happens" (if the antidote is listed as consumable it would be wasted)
Unknowns
For a HP healing item would this same strategy work?
Would I have to make make multiple common events for different healing items? or can this all be done in one common event?
HP healing doesn't need any common event, that is the basic function of the "damage" formula and type.
Just make a new project and check how HP Potions are done by default.
Oh - and it is better readable if you use the regular conditional branch for "has state inflicted" instead of a script line - the result would be the same, but using the regular check will allow you to read which state is checked for by name instead of by numbers.
Doesn't the regular check asks for a specific player? Not the target player?
Here's my logic:
use Item>check target actor state>one branch
use Item>check actor[] state>more branches per character?
For multiple items to use the same common event would making a check to see if the item was used work?
If so that line is?
The item is asking for a target when used - items don't have a "skill user", they only care about target - that is what makes the effects easier to use than a common event, because only with a common event you have the problem of identifying the target of the item.
And because of this, items are easier to use without a common event, you should only use common events for rare special cases where the default logic doesn't work.
Oh I see, I wanted it to show the text that the item had no effect. I disabled the 'can't select/use' sound the game normally has.
Can I make a common event that ask if the item was consumed then displays a message on if it was or not?
no, it has to be the other way around - you can set it to consume and then give one back in the common event if certain conditions were not met, or set it to not consume but remove it by event command in the common event.
I still think there is something off in your description due to you not telling things that you know but we can't read in your mind.
If you give a full description of what you want, we might be able to point you to a better solution.
That code is the victim of a forum problem from about one or two years ago, then all script codes were condensed to single lines instead of being script listings - it cannot work in that form, but unfortunately it needs someone with programming knowledge to make it operational again by seperating the lines at the correct positions.
So basically you want to replace the default "buzzer" when health is max with a text message?
If that is the case, it might be easier to ask someone for a small plugin doing that
That's exactly what I'm looking for, in regard to health items.
The method I had above for antidotes is working well.
For the conditional check that checks if the party loses an item. Would any of the following work? This is just so I can make one common event for status items if they work or not.
$game_party.lose_item(item, 1) if item.is_a?(RPG::Item) && item.consumable
$game_party.lose_item(item, 1)
or
$game_party.gain_item(item, -amount, include_equip)
Also if anyone can decode those lines that would be great. I'll probably just PM the user who coded it.