playMaker

Author Topic: Beginner Question - Comparison  (Read 601 times)

VeryGood

  • Playmaker Newbie
  • *
  • Posts: 1
Beginner Question - Comparison
« on: January 11, 2021, 06:29:25 AM »
Hello,

I am currently working on my first project and have hit a brick wall.

It's a shooting game where the player can choose from 5 different types of arrows and each enemy can only be killed by one specific type of arrow.
If one of the arrows collides with the enemy character I would like to compare the variable of the arrow with the variable of the enemy. If the variables are the same then the enemy gets destroyed, if not, nothing happens.

What would be the best way to programm the comparison between the arrow and the enemy with playmaker?

I am open for any suggestion.

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: Beginner Question - Comparison
« Reply #1 on: January 11, 2021, 07:02:03 AM »
Add new fsm to arrows and have an int variable like "ID" and give an number to all arrows. In enemies use collision /trigger event and save the collided arrow object using store collide. Then, use get fsm int action and get that ID and compare