playMaker

Author Topic: Playmaker and Equipping Inventory Items [solved]  (Read 2141 times)

solideuk

  • Playmaker Newbie
  • *
  • Posts: 6
Playmaker and Equipping Inventory Items [solved]
« 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
« Last Edit: August 21, 2015, 09:45:09 AM by solideuk »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Playmaker and Equipping Inventory Items
« Reply #1 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 and add the items to it and then you can check if the list contains your items.

Here are some tutorial videos for array maker

solideuk

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Playmaker and Equipping Inventory Items
« Reply #2 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