Hi,I wonder if anyone has any idea what is the correct Condition code to determine if a projectile lands in front or behind of enemy char?My goal is the a "horizontal turn" (aka change of facing) of the Explod anim depending it lands behind or in front of the enemyI tried the below but the facing is NOT always right when the chars switch facing/side...;(IMPT: This is a Helper-Type Projectile state, Pos X refers to the position of the Helper-Type Projectile, not player character)[State 1000, Explod]type = Explodtrigger1 = (MoveContact = 1) || (MoveHit = 1) || (MoveGuarded = 1)trigger2 = (Pos Y >= -20) anim = 1000;id = 2300pos = 0,0postype = p1facing = Cond(Enemy,Pos X > Pos X, -1, 1) <= this is the part I have trouble with;vfacing = 1bindtime = 0;vel = 0,0;accel = 0,0;random = 0,0removetime = -2supermovetime = 0pausemovetime = 0scale = 1,1sprpriority = 3;ontop = 0;under = 0shadow = 0,0,0ownpal = 1removeongethit = 1ignorehitpause = 1;trans = persistent = 0;supermove = I had also tried facing = 1 && (Enemy,Pos X > Pos X)(Enemy,Pos X > Pos X) * Cond((Pos X > Enemy, Pos X) && (Enemy, Pos X > Root, Pos X), -1, 1)among many others...But all not working properly when the characters are standing at certain distance or spots... Help please...
Use P2Dist or P2BodyDistQuoteFor comparing the X-distance, P2Dist gives the X-distance of P2's axis from P1's axis. A positive value indicates P2 is in front of P1. See also P2BodyDist.http://mugenguild.com/forum/topics/p2dist-triggers-169013.0.html
Thanks XGargoyle. Its so straightforward with a P2Dist < 0.Appreciate the help. Saved me lots of agony.