Jump to content
  • 0

Helper binding problem


DuckAzz

Question

I have a problem with some move again...
So when explosive (p1) hit p2 with some special move which I have created, he need to place the bomb into the p2's body then it will blow up in the p2's body...explod gets binded on p2 but helper doesn't do that...
 
Here's the picture:
r3MQgwp.png
 
Code in p1's state:
 
[state 810, Helper]; It's in throwing state
type = Helper
trigger1 = time = 21
helpertype = normal
name = "Bomb in the body"
id = 1574
pos = 0, -50
postype = P2
stateno = 1574
keyctrl = 0
 
and here's the code in helper 1574:
 
...
 
[state 1000]
type = bindtotarget
trigger1 = 1
time = 9999
pos = 0,-50,mid
persistent = 1
 
[state 1000];Bomb indicator
type = explod
trigger1 = time = 0
anim = 850
ontop = 1
postype = p2
pos = 0,-65
removeongethit = 0
ignorehitpause = 1
bindtime = -1
 
[state 1000]
type = changestate
trigger1 = time = 300
value = 1573
 
 
help?
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

In order for BindToTarget to work, your helper needs to have a target. You helper will lose its target as soon as the player recovers, as he needs to be in hitstates. Here's how I would do this:

First, give the HitDef an ID. Let's call it 444 for the same of example. Next, you want to store the ID of your target in a variable for future use. You can do that easily with:

trigger1 = numtarget(444) && movehit
var(#) = target,ID
Now that you have the ID of your target, all you need to do is use a PosSet, to position the helper on the target, using their x and y positions. Like so:

trigger1 = playerIDExist(var(#)) ; If the player of your target's ID exists
x = playerID(var(#)),pos x
y = playerID(var(#)),pos y
ignorehitpause = 1
That's it. Now, you'll have your very own "Target Bind" without the needing an actual target. Pretty cool, huh?
Link to comment
Share on other sites

  • 0

well it didn't work good...

here's the explanation in code and on picture:

 

here's how I edit the code:
 
in state 810:
[state 1000, Varset]
type = varset
trigger1 = numtarget(444) && movehit
var(4) = target,ID
ignorehitpause = 1
 
[state 1000, 6]
type = HitDef
trigger1 = time = 0
attr = S, SA
animtype  = Hard
damage    = 50, 2
priority  = 5
hitflag = MAF
guardflag = MA
pausetime = 0,0
sparkxy = 0,0
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -2,0
air.velocity = -4,0
 
[state 1200, Helper]
type = Helper
trigger1 = movehit 
helpertype = normal
name = "Bomb in the body"
id = 1574
pos = 0, -50
postype = P2
stateno = 1574
keyctrl = 0
 
 
in helper:
 
[state 1000]
type = posset
trigger1 = playerIDExist(var(4)) ; If the player of your target's ID exists
x = playerID(var(4)),pos x
y = playerID(var(4)),pos y
ignorehitpause = 1
 
picture:
8QZjinD.png
what i'm suposted to do?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...