Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Item use restrictions

Status
Not open for further replies.

Morpork

Villager
Xy$
0.00
Hi there.
I'm trying to figure out a way to restrict item usage based on either actor or class. The items in question have different effects such as attacking an enemy, buffing the ATK stat temporarily and things that are battle focused.

I thought I could use common events to achieve this, but it seems impossible unless I'm missing something.

Is there a way it can be done?

Thanks!
 

MinisterJay

Administrator
Staff member
Administrator
You can define what weapons are usable by each class, and only those classes can use it. If you want a specific character to use a specific weapons, and only that person can use it, even if there are multiple characters having the same class, then you can make a copy of that class, and slightly reword it, and make it only where that person can use that specific weapon.
 

Morpork

Villager
Xy$
0.00
Hi MinisterJay, thanks for your reply.

Sorry if I wasn't clear, but I meant single use items as opposed to weapons or armours.
For example:
A scroll that when used by a Warrior and only a Warrior will increase his ATK for that battle. If another party member tried to use the scroll it won't have any effect, or can't be used. Since the 'Item' category is shared by all party members in battle, I was hoping for a way to restrict usage of certain items.


Himeworks had a script for doing this, but it hasn't been converted to MV as of yet.
http://himeworks.com/2013/11/custom-use-conditions/
 

MinisterJay

Administrator
Staff member
Administrator
Thanks for the clarification. Working on it.
[doublepost=1454283883,1454283012][/doublepost]Reading some of Hime's works, he did state it may be possible with events.

If you want to do it with events, you can add a state to the target, and then call your common event which will check each actor for the specific state, and if it is applied, determine whether the actor is suitable.
This is one way to make it where only a specific actor or class type can use an item.
 

Morpork

Villager
Xy$
0.00
Thanks again for the help MinisterJay.

I hadn't thought about using states with the common events.
So for the ATK buff, I just created a State called ATKBuff, which has the Trait of Attack * 150%.
Then the common event has the Conditional Branch to check if the Actor I want is using it and if so applies the state.

For an item that would cause damage to the enemy, I created a skill to do so, then in the Common Event of the item, it forces an action of the user to use that skill against the last target.

While not perfect and a little limited, it does the job!
 

LTN Games

Master Mind
Resource Team
Xy$
0.01
I'm locking this topic due to being addressed and solved if for any reason you would like it re-opened please report this topic.
 
Status
Not open for further replies.
Top