UncannyBoots

Veteran
Veteran
Joined
Feb 1, 2020
Messages
42
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,128
Reaction score
8,002
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
42
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 Profile Posts

KenKrath wrote on RPGMakerWeb's profile.
Nevermind.
I found a book about game localization. It costs R$708,00 on Amazon. ;_;
I really wish my game was far enough along for it to be actually playable beyond certain aspects. I think I've crafted a really fun battle system thanks to ATB, fighting game, and Boost point mechanics.
Play test of my current progress on Happy Camper
Cutscene Contest Winners have been announced!

Forum statistics

Threads
109,113
Messages
1,042,200
Members
141,612
Latest member
mhayes
Top