Problems with TargetBind

Started by Dawn de Era, November 10, 2016, 10:16:41 PM

Previous topic - Next topic

Dawn de Era

I'm trying to have the enemy rise slowly when close to the player, fast when far from the player, etc. This is what I have in the helper:
[State 3002, TargetBind]
type = TargetBind
triggerall = target, pos x > (parent, pos x + 54) && target, pos x < (parent, pos x + 84)
trigger1 = Time%3 = 0
time = 1
pos = 0,pos y + -1

[State 3002, TargetBind]
type = TargetBind
triggerall = target, pos x > (parent, pos x + 84)
trigger1 = Time%2 = 0
time = 1
pos = 0,pos y + -1

[State 3002, TargetBind]
type = TargetBind
triggerall = target, pos x < (parent, pos x + 54)
trigger1 = Time%6 = 0
time = 1
pos = 0,pos y + -1


Apparently, this is relative to the helper's position. I need it to be relative to the enemy's previous position.

Dawn de Era

Nevermind, Gudine supplied me with a bit of code that fixes the problem.