Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: solideuk on August 20, 2015, 05:32:26 PM

Title: Playmaker and Equipping Inventory Items [solved]
Post by: solideuk on August 20, 2015, 05:32:26 PM
Hi All,

I would be grateful for some advice. What would be the best approach if I would like a trigger to determine whether the player is holding an item?

For example:
If player enters a trigger and is holding an apple, the box should turn green.
If player enters a trigger and is holding an orange, the box should turn orange.

What is the best way to do this?

Should I place a 'tag' on the objects and then use OnStayTrigger to find if a player is holding a particular object?

Many thanks in advance for any guidance
Title: Re: Playmaker and Equipping Inventory Items
Post by: djaydino on August 21, 2015, 02:31:49 AM
Hi,
It depends on how many items.
if just a few you can make some bools with their name and check if those bools are set to true.

If you get more items you could use arraymaker (https://hutonggames.fogbugz.com/default.asp?W715) and add the items to it and then you can check if the list contains your items.

Here (http://hutonggames.com/playmakerforum/index.php?topic=9800.0) are some tutorial videos for array maker
Title: Re: Playmaker and Equipping Inventory Items
Post by: solideuk on August 21, 2015, 09:44:25 AM
Thanks djaydino

I've taken this approach, I've used the Get Child method to get the tag name then used the boolean parameter to see if they are true/present