YesNoOk
avatar

Attacking Helper characters (Read 776 times)

Started by Dcat, August 25, 2009, 12:33:02 pm
Share this topic:
Attacking Helper characters
#1  August 25, 2009, 12:33:02 pm
  • ***
  • Your Channel 6 News Anchor is in another Castle!
    • dcat.mugen-infantry.net/
I wanted to figure out an efficient set of triggers to attack opponents who are helper characters using moves that can put p2 in a custom state. Note I don't want to put the helper opponents in custom states (that's impossible without fullgame standardization) I just want the attack to connect regardless if the opponent is or isn't a helpertype character. So I added a second hitdef to the state as a failsafe so the attack won't whiff completely.

Here's my code:


[State 420, Hit Players]
type = HitDef
triggerall=!(target, ishelper)
triggerall=P2Stateno!=421 ; opponent isn't in the hit by launcher state
trigger1=Animelem=2
trigger2=!movecontact
trigger2=Animelem=3
attr = S, NA
damage    = 45, 0
priority  = 3, Hit
pausetime = 8,8
givepower = 30
getpower = 45
animtype  = up
hitflag = MA
guardflag = MAF
sparkno = s780
sparkxy = -15,-60
guard.sparkno = s8000
hitsound = s702,0
guardsound = s1,1
ground.type = High
ground.slidetime = 0
ground.hittime  = 20
ground.velocity = 0, -16
air.type = Low
airguard.velocity = -5,-5
air.velocity = 0,-8
air.hittime = 20
P2stateno= 421
recover=0



[State 420, Hit Helpers]
type = HitDef
triggerall=target, ishelper
trigger1=Animelem=2
trigger2=!movecontact
trigger2=Animelem=3
attr = S, NA
damage    = 45, 0
priority  = 3, Hit
pausetime = 8,8
givepower = 30
getpower = 45
animtype  = up
hitflag = MAFD
guardflag = MAF
sparkno = -1
sparkxy = -15,-60
guard.sparkno = s8000
hitsound = s702,0
guardsound = s1,1
ground.type = High
ground.slidetime = 0
ground.hittime  = 25
ground.velocity = 0, -10
air.type = Low
airguard.velocity = -5,-5
air.velocity = 0,-8
p2facing = 1
fall=1
fall.hittime=200
fall.recovertime=200
recover=0
air.hittime=200
air.recovertime=200
air.recover=0


This works perfectly & connects on the nonhelper characters but it completely whiffs the Helper characters, what's wrong with my triggers for the second hitdef? On top of it not connecting, I get debug flood, please help.



EDIT: I've tried changing the code to  a simple double negative & it now hits the helpers and players but I'm still getting debug flood.
Why will a double negative expression work and not a positive? And why am I still getting debug flood?

My new code is this:

[State 420, Hit Helpers]
type = HitDef
triggerall!=!(target, ishelper)
trigger1=Animelem=2
trigger2=!movecontact
trigger2=Animelem=3
attr = S, NA
damage    = 45, 0
priority  = 3, Hit
pausetime = 8,8
givepower = 30
getpower = 45
animtype  = up
hitflag = MAFD
guardflag = MAF
sparkno = -1
sparkxy = -15,-60
guard.sparkno = s8000
hitsound = s702,0
guardsound = s1,1
ground.type = High
ground.slidetime = 0
ground.hittime  = 25
ground.velocity = 0, -10
air.type = Low
airguard.velocity = -5,-5
air.velocity = 0,-8
p2facing = 1
fall=1
fall.hittime=200
fall.recovertime=200
recover=0
air.hittime=200
air.recovertime=200
air.recover=0
Last Edit: August 25, 2009, 12:46:06 pm by Dcat
Re: Attacking Helper characters
#2  August 25, 2009, 01:04:55 pm
  • avatar
  • ******
    • Thailand
Hitdefs are the state controlers that give you a target in the first place, so, using a trigger that triggers a hitdef only when you have a target is sort of silly in this case. :P

To solve your problem, instead of using the "p2stateno = ####," parameter, use a targetstate, like so:

state #
targetstate
trigger1 = numtarget && movehit
trigger1 = !(target,ishelper)
value = ####


targetstate
^Click


On a side note, when you get debug spam for no target, that means you need to use a "numtarget" trigger, one trigger above the "target,blah" trigger.
Last Edit: August 25, 2009, 01:08:35 pm by Girl
Re: Attacking Helper characters
#3  August 25, 2009, 01:17:14 pm
  • ***
  • Your Channel 6 News Anchor is in another Castle!
    • dcat.mugen-infantry.net/
Thank you . That clears things up a great deal.
I appreciate the timely response
Re: Attacking Helper characters
#4  August 25, 2009, 01:18:16 pm
  • avatar
  • ******
triggerall=P2Stateno!=421 ; opponent isn't in the hit by launcher state

What if the opponent just so happens to have a state 421 of his own (like a light punch) and is currently doing it ?
Rather give your hitdef an ID and then say that the hitdef can't chain with that ID (i.e. can't chain with itself).
Id = 421
nochainid = 421
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.