Item that gives status to either user or enemy?

Sakurra

I want a brownie.
Veteran
Joined
Sep 1, 2015
Messages
743
Reaction score
632
First Language
English
Primarily Uses
RMMV
I want to make a berry item when if the player eats the berry, put the user to sleep. But the same berry can be thrown at an enemy, causing the foe to fall asleep. Can this be done and if so how?

Thanks for reading.
 

coyotecraft

Mythographer
Veteran
Joined
Mar 13, 2012
Messages
300
Reaction score
172
First Language
English
Primarily Uses
N/A
Set the item's scope to enemy & ally.
 

coyotecraft

Mythographer
Veteran
Joined
Mar 13, 2012
Messages
300
Reaction score
172
First Language
English
Primarily Uses
N/A
Oops, sorry. I forgot that's just in MZ.
 

coyotecraft

Mythographer
Veteran
Joined
Mar 13, 2012
Messages
300
Reaction score
172
First Language
English
Primarily Uses
N/A
Here's a non-script solution, that assumes a berry would never be used on the party in battle.

Basically you create A "Berry" item and a "Throw: Berry" item in the database. Preferably right next to each other

Create a Battle event that'll run at the start of every battle
When Turn:0
If party has Berry
set Berry amount to variable
remove Berry by variable amount
add "throw:berry" by variable amount
turn switch "berry exchange" on.


Then create a common event, Trigger: Parallel Process, Switch: Berry Exchange
Same thing but reversed
if party has Throw:Berry
set Throw:Berry to variable
remove Throw:Berry by variable amount
add Berry by variable amount
turn switch "berry exchange" off.


So in-battle the berries get converted to throw:berries; outside of battle, any throw:berries get converted to berries automatically by the common event. The items should appear in the same place in the inventory so long as they're right next to each other in the database.
You can rename "throw:berry" to just "berry"; if you want. But Idk, I think if you're going to set it up like this you might as well communicate to the player that an item can be thrown in battle.
 

Sakurra

I want a brownie.
Veteran
Joined
Sep 1, 2015
Messages
743
Reaction score
632
First Language
English
Primarily Uses
RMMV
That's a great idea. It gives me an idea of my own.

Maybe a Common Event where the player is given an option to "eat berry" or "throw at enemy"?

And then I can make it where the berry item can only be used in battles only. But I still like to be able to eat the berry outside of battle and cause sleep. But that's okay if not.

Thanks for the cool suggestions everyone. ^_^
 

Sakurra

I want a brownie.
Veteran
Joined
Sep 1, 2015
Messages
743
Reaction score
632
First Language
English
Primarily Uses
RMMV
I've worked with this a little more and made a common event for the item. Looks good so far. But I had to set it to where the item can only be used in battle. The common event shows the choices "Eat" or "Throw at the enemy"

But I would like to be able to put a conditional script to check if the player is in battle or not. And if yes, the choices show. But if now, and the player is on the map, then no choices and they are just put asleep. Edit: And if a little HP was recovered.

Is this possible?

Edit: I've run into a problem with the Common Event. I can't have the enemy be selected so I chose at random. I'm unsure as to what to do.

Edit 2: I'll probably end up scrapping the idea. :p
 
Last edited:

Latest Threads

Latest Profile Posts

Watch Studio Blue play Numina by starlit in our latest RPG Maker Games Critique stream starting NOW!

Wish me luck. One of the leading experts on certain false shuffle is going to check if my skill is good enough to be called "not total trash".
Not an RPG Maker Update but I'm happy to say that I finally passed my drivers written test. Which makes me a happy guy.
FWRu-cYXkAAAUbl
Have you ever been in such a luck streak you felt fear something was wrong?

Forum statistics

Threads
123,126
Messages
1,154,184
Members
161,461
Latest member
TelorDadar69
Top