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!

how to trigger event when got multiple item

ben99

Villager
Xy$
0.00
$gameParty.itemNumber($dataItems[54]) == 5

(or a script to check inventory to have the certain quantity of item and above?)
I'm trying to trigger an event when I got multiple items in inventory.
And I know the script call above is wrong, anyone know the correct script for this?

thanks in advanced.
 

shaenedvird

Villager
Xy$
0.00
I don't know about the script, but...

You can try opening up your database and going to the common event tab.

Name a common event, select parallel from the drop box, and click in the contents portion.

Under Game Progression, select Control Variable

Pick a variable and name it. Under operation, select SET

Under Operand, click Game Data
Finally, select the item that you want.

What this will do is create a variable that is always in the background being set to exactly what the count of that item is.

In that same common event, beneath your variable assignment, click again and add a Condition Branch, to make an if-then statement that checks if the variable you assigned to the item count is at the number you want. If it is, put whatever you want to happen to happen.

That should work unless I misunderstood you.
 

ben99

Villager
Xy$
0.00
I don't know about the script, but...

You can try opening up your database and going to the common event tab.

Name a common event, select parallel from the drop box, and click in the contents portion.

Under Game Progression, select Control Variable

Pick a variable and name it. Under operation, select SET

Under Operand, click Game Data
Finally, select the item that you want.

What this will do is create a variable that is always in the background being set to exactly what the count of that item is.

In that same common event, beneath your variable assignment, click again and add a Condition Branch, to make an if-then statement that checks if the variable you assigned to the item count is at the number you want. If it is, put whatever you want to happen to happen.

That should work unless I misunderstood you.
Thanks for your reply.
I already solve this problem by using variable weeks ago, but still thanks for your answer. Using variable can solve my problem.
 
Top