YesNoOk
avatar

TargetBind. (Read 1273 times)

Started by Maistral, April 30, 2012, 08:14:41 pm
Share this topic:
TargetBind.
#1  April 30, 2012, 08:14:41 pm
  • avatar
  • **
  • Whatever.
Alright, it's been a while since I asked here, lol.

So yeah. I have this attack that would cause the enemy to bind to the player when he is hit:

Code:
[State 0, TargetBind]
type = TargetBind
triggerall = time < 36
trigger1 = movehit && p2dist x <= 20 && p2dist y >= -20
time = 1
pos = 20,-20

The problem now is, if it hits the enemy's helper, the enemy ends up being bound to the player. Wanted it such that if the player hits the enemy's helper, the enemy (would of course) not be suddenly bound to the player's attack.



MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks

Re: TargetBind.
#2  April 30, 2012, 10:22:10 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
How is the enemy a target when you hit the helper? Are you hitting them both? Things only become a target of targetbind if they're movetype = H. The opponent MUST be in a hitstate for this to work.

You could ID the hitdef and use that as a requirement for the targetbind. Doesn't tell us why you're getting p2 as a target when you hit a helper though.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: TargetBind.
#3  May 02, 2012, 09:42:23 am
  • avatar
  • **
  • Whatever.
Gah! I forgot that I could ID the hitdef, lol. Forgot it altogether lololol.

Oh well, shit happens. Thanks :D


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks

Re: TargetBind.
#4  May 02, 2012, 10:06:13 am
  • avatar
  • **
  • Whatever.
Meh, reopened.

Code:
[State 0, TargetBind]
type = TargetBind
triggerall = time < 36
trigger1 = movehit
time = 1
id = 2
pos = 20,-20

[State 1314, 1]
type = HitDef
trigger1 = time%4 = 0
attr = S, NA
damage = 4,1                  ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime =0,11                 ;Time attacker pauses, time opponent shakes
sparkno = 1                    ;Spark anim no (Def: set above)
sparkxy = -30, -25              ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = S9, 30                 ;Sound to play on hit
guardsound = S9, 30               ;Sound to play on guard
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 0             ;Time that the opponent slides back
ground.hittime  = 10             ;Time opponent is in hit state
ground.velocity = -10 ,-.8             ;Velocity at which opponent is pushed
airguard.velocity = -10,-.8     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -10,-3           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12
envshake.time = 5
envshake.freq = 60
envshake.ampl = -4
envshake.phase = 90
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
id = 2

So yeah, I put the id tag. The problem now is, the enemy would still bind to the attack when the enemy is standing up. This, I truly do not know now what to do. :(


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks

Re: TargetBind.
#5  May 02, 2012, 10:08:59 am
  • avatar
  • **
  • Whatever.
How is the enemy a target when you hit the helper? Are you hitting them both? Things only become a target of targetbind if they're movetype = H. The opponent MUST be in a hitstate for this to work.

You could ID the hitdef and use that as a requirement for the targetbind. Doesn't tell us why you're getting p2 as a target when you hit a helper though.

Yep. The attack only binds the enemy when P2 is movetype = H. My problem was when the enemy is in a lying-down state, and I hit its helper, P2 would be binded to the attack thus attacking both the helper and P2.

ID tags partially solved the problem. It only gets binded when the enemy's getting up now. :(


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks

Re: TargetBind.
#6  May 02, 2012, 10:14:05 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
He shouldn't be ID 2 at that point, or is this using the attack twice in quick succession?

Type = Targetdrop
time = 0


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: TargetBind.
#7  May 03, 2012, 05:17:08 am
  • avatar
  • **
  • Whatever.
Nope, this one's attacking rapidly in a quick succession (ie. something like... how to describe.. oh; being machine-gunned "physically", or something like that)


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks

Re: TargetBind.
#8  May 03, 2012, 08:40:45 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Well then how does he wind up lying down with ID = 2? Does the attack miss him at some point yet keep going and he's managed to launch an unkillable projectile or something?


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: TargetBind.
#9  May 04, 2012, 01:45:26 pm
  • avatar
  • **
  • Whatever.
It's actually a helper that is always there.

It's similar to my old puppet character; for example when the parent is knocked out, then getting up, and while this is happening the puppet is hit by the binding attack; the parent would suddenly bind to the attack causing both the puppet and the parent to be hit.


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks

Re: TargetBind.
#10  May 05, 2012, 12:31:18 pm
  • avatar
  • **
  • Whatever.
Code:
[State 0, TargetBind]
type = TargetBind
triggerall = movehit
trigger1 = p2stateno != 5110                <<<<<<<<<<<<<
time = 1
pos = 20,-20
id = 2

This apparently solved it. Thanks anyway.


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks