Calling Common Events with Items

Status
Not open for further replies.

Nekohime1989

Nekohime
Veteran
Joined
May 31, 2014
Messages
498
Reaction score
226
First Language
English
Primarily Uses
RMMZ
My objective is to decrease a variable and the actors mp. But the variable that is decreased depends on the actor the item is used on. But I can't seem to figure out how to do it. Is their a specific scriptCall that selects the actor an item is used on?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
no need for a script (although there are some plugins that give such scripts)

With eventing, you add a state as the effect, a state that is invisible and does nothing,named "targeted"or something like that.
Then, in the common event you check all actors until you find the one with that state (conditional branch), apply the effect you want and remove the state.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
839
Reaction score
467
First Language
Poland
Primarily Uses
RMMV
Code:
$gameParty._targetActorId
This will return ID of actor wich item you used on.

Eg. Actor with ID 7 uses your book on leader, then this code will return 1, wich is party leader and you can assign this to your variable.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top