playMaker

Author Topic: Alternative to Tags  (Read 1225 times)

MajorIdea

  • Full Member
  • ***
  • Posts: 131
Alternative to Tags
« on: April 06, 2017, 01:27:26 PM »
Say I have s player that can walk, run and carry an object. And also a trigger that the player goes over and is only activated if the player is running.

The way I have it now is by changing the player tag to PlayerRunning and the trigger only listens to that tag.

This works but seems a bit dumb and has some disadvantages. What if I want to have the trigger only activate if the player is running whilst carrying and object? I'd have to add yet another tag.

Is there a way of doing this better? Some action I'm missing or methodology I'm not aware of? (I'm not a trained programmer)

Perhaps enums? Or having bools and the trigger only listens to one Player tag and then checks for a true bool for both running and carrying?

That could work but seems like it could turn into as big of a mess as changing tags.

Any ideas or advice?
« Last Edit: April 06, 2017, 01:29:41 PM by MajorIdea »

Ofonna

  • Full Member
  • ***
  • Posts: 230
Re: Alternative to Tags
« Reply #1 on: April 06, 2017, 05:50:48 PM »
you cant go wrong with using bools in this case,then test the bool before any trigger action