Every time I try, or want to spawn an Explod on top of P2's mid pos Y, or head pos Y. the explod always positions on the character's own mid pos Y, or head Pos Y position instead, while being spawned on top of P2. I noticed this when I took several screen shots, and the explod appeared at the very same spot on P2, instead of where P2's head, or mid pos Y is supposed to be.
Is there any way I can bind, or spawn an explod exactly on P2's mid.pos y, or head.pos y offset value?
I have already tried things such as this:
[State X, Explod]
type = Explod
trigger1 = Time <= 0
postype = p2
pos = 0, Ceil(Const(size.head.pos.y)
[State X, Explod]
type = Explod
trigger1 = NumEnemy > 0
trigger1 = Time <= 0
postype = p2
pos = 0, EnemyNear, Ceil(Const(size.head.pos.y)
None of these seem to work.
EDIT:
Okay, I think I'm just going to make this thing a helper instead of an explod. It seems to work better after I defined the player ID, I think.
;----- Enemy ID -----
[State X, VarSet]
type = VarSet
trigger1 = Time <= 0
trigger1 = Var(10) <= 0
ignorhitpause = 1
var(10) = EnemyNear, ID
;--------------------
[State X, PosSet]
type = PosSet
trigger1 = 1
x = PlayerID(Var(10)), Pos X
y = PlayerID(Var(10)), Pos Y + PlayerID(Var(10)), Const(size.head.pos.y) - 20
Using PosSet seems to work for the moment, since I can add the Player ID's head pos Y to their current Y position.
Though I would have liked a second opinion so I won't have to use a helper object just to display an explod properly.