UncannyBoots

Veteran
Veteran
Joined
Feb 1, 2020
Messages
41
Reaction score
5
First Language
English
Primarily Uses
RMVXA
Sorry for making another thread but I have another big problem that VX Ace does not seem to be able to (easily) do by default.

When I use an item, its effect calls a common event and some stats are changed. But I do not know how to make it so that the "Change Parameter" event command knows what actor used the item. There's a variable option for selecting which actor the parameter event command should target, but I don't know how to tie the user of the item into a variable value.

In other words: how would I make a "Change Parameter" event command target the actor that is using the item? Is this possible without having to use conditional branches to see who's in the party and the selecting them in a message choice window? I really don't want to do that... Especially since one of the items that changes parameters permanently will do so in battle.

Oh and I edited the title to mention this but yeah I'm not ONLY talking about a simple parameter like ATK either which is easy for an item to change, I'm referring to ex and sp parameters (which also cannot easily be modified in events by default, I had to search for scripts and finally found Shaz's Dynamic Feautures script to solve that issue). But even with normal parameters I still am using the "Change Parameter" command in the common event because I do some stuff with variables that isn't a simple value like you would add on the item effect page.

Thank you for your time
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,074
Reaction score
7,982
First Language
German
Primarily Uses
RMMV
you create an invisible target state (no messages, no icon) and have the item inflict it to the target.
then in the common event you check each actor if it has that state applied.
if yes, make the changes to that actor and remove the state.

it's a bit inconvenient if you have a lot of actors - if too many actors need to be checked, then you might have to use the script equivalent of the event commands where you can use a variable with the actor ID instead.
 

Unisoft

Villager
Member
Joined
Jan 21, 2021
Messages
27
Reaction score
6
First Language
English
Primarily Uses
RMMV
I don’t use VX Ace so I apologise if this does not work, but here’s how I solved this in MV:

each actor has a unique state, just to flag who they are.
In the damage formula, check who was targeted using isstateaffected and then store the actor number in a variable

this has lots of applications, but does mean you need to use a damage formula. I usually have the item recover MP or HP just so I can use the formula box.

Edit: Andar beat me to it, and his solution doesn’t have the limitation of mine.
 

UncannyBoots

Veteran
Veteran
Joined
Feb 1, 2020
Messages
41
Reaction score
5
First Language
English
Primarily Uses
RMVXA
Thanks so much you two, I got it working now. It's a very clever solution. This thread can be consider solved
 

Latest Threads

Latest Posts

Latest Profile Posts

unnamed_image.jpg
SOMEONE'S SINGLE! HE DOES LIKE LONG WALKS IN THE IN THE SHADOWS AND THE SMELL OF DECAY. SADLY, HE HAS NO NUMBER TO NOTE OF BECAUSE HE HAS NO USE FOR A PHONE, BECUASE SUMMONING WORKS MUCH BETTER AND DOES NOT COME WITH AN ITEMISED BILL. REMEMBER TO TREAT HIM GOOD ON THE FIRST DATE!
I just found out that MZ regional price on Steam in my place is much cheaper than MV.
Our water started to work again, now i don't have to fill up our toilet with water again.
Finally able to return to work after months of lockdown. My poor feet are hurting :( I need to get used to working again haha

Forum statistics

Threads
108,877
Messages
1,040,227
Members
141,312
Latest member
flortus
Top