Determine user of item

Status
Not open for further replies.

Vis_Mage

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
574
Reaction score
196
First Language
English
Primarily Uses
RMMV
I'm trying to make an item that changes the stat of the user of the item via a script call using a common event. Unfortunately, the script call can only be applied to a set actor ID.

What I am looking for is either a script call or script itself that allows the game to check what actor ID is using the item, and from there set a variable to a set amount. From there, I can have the common event go to the correct script call via conditional branch. 

For example, lets say I have 3 characters, Merric, True, and Diana. If True uses the bread item, it would set variable X to 1. From there the common event would go...

IF variable X=0 

-script call-

else

IF variable X=1

-true's version of script call-

else

yada yada yada...

Could someone help me figure out how to go about this?
 

Uzuki

Kawaii on the streets, Senpai in the sheets
Veteran
Joined
Aug 18, 2012
Messages
1,933
Reaction score
1,326
First Language
English
Primarily Uses
RMMV
Well the items can increase stats without a script. Just set the item scope to "One Ally", then you can add the parameters by clicking the Effects box to the right, go to the Other tab, and pick Growth. From there you can pick any stat you want to increase (to decrease you'll have to do that manually).
 

Vis_Mage

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
574
Reaction score
196
First Language
English
Primarily Uses
RMMV
Well the items can increase stats without a script. Just set the item scope to "One Ally", then you can add the parameters by clicking the Effects box to the right, go to the Other tab, and pick Growth. From there you can pick any stat you want to increase (to decrease you'll have to do that manually).
Huh, interesting to know, although not quite what I'm getting at.

I guess I didn't phrase it all that great, but I'm trying to add a value to an actor via a script (and effort value script), and not just adding defult stats. To be specific, I need to run the fallowing script call:

ACTOR.param_ev_gain(id,gain)

The thing is, the script doesn't have an option to change the actor part into an overall user targeting, so I'm looking to have that script call set up for all actors, and the variable set by the process in the first post would then determine which call to run.
 

dinhbat3

Veteran
Veteran
Joined
Feb 5, 2014
Messages
184
Reaction score
31
First Language
English
Primarily Uses
Hime has a Common Event's Variables script that I use for most everything of this sort of nature.

It automatically sets things like the user ID, target ID, skill ID, item ID and more.

It was also pretty easy for me to use and create my own uses for it.

~ Dinhbat
 

Vis_Mage

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
574
Reaction score
196
First Language
English
Primarily Uses
RMMV
Hime has a Common Event's Variables script that I use for most everything of this sort of nature.

It automatically sets things like the user ID, target ID, skill ID, item ID and more.

It was also pretty easy for me to use and create my own uses for it.

~ Dinhbat
Thanks a bunch for the link, I got everything working now! :D
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
There is one alternative if you don't want to use scripts:


use the damage formula to store the actor ID into a variable of your choice, something like


v[99]=a.id


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,045
Members
137,569
Latest member
Shtelsky
Top