YesNoOk
avatar

P2Facing Helper (Read 1388 times)

Started by DingusMB, February 01, 2018, 11:00:43 pm
Share this topic:
P2Facing Helper
#1  February 01, 2018, 11:00:43 pm
  • **
  • Déjà vu, mayhap—have you been here as well?
How can I make a Helper go to a specific state depending on the direction the enemy is facing?
Re: P2Facing Helper
#2  February 02, 2018, 06:27:21 am
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
Offhand, I can't remember if p2 is an enemy to the helper.

If yes, you just do something like:

Type = changestate
trigger1 = enemynear,facing = facing
value = 1111

Type = changestate
trigger1 = enemynear,facing != facing
value = 2222


If not... use a varset in State -2 like:

Type = Varset
trigger1 = numenemy
var(55) = enemynear,facing

Then in the helper code you can then use that like:

trigger1 = parent,var(55) = facing