YesNoOk
avatar

Custom states (Read 2131 times)

Started by Lord Mike, June 10, 2014, 08:55:52 pm
Share this topic:
Custom states
#1  June 10, 2014, 08:55:52 pm
  • ***
  • 見ろ! これが執念の力だ!
    • Somalia
Good evening MFG.
I find myself once again in the need of your help.
It's been more than 3 years since i've done any mugen related work, and i'm getting very rusty...
Here's what i'm trying to pull:
-p1 uses a one hit KO attack on p2
-p2 has a specific name
-while all the chars not named "specific" will go into 5150 at the end of that attack, as i would be normal, i want p2, "specific" to go to the special state 2600 instead
-p2 recognizes p1's name and goes into a custom state, not into the hit_liedead state.
Now, i have tried to put a trigger enemy,name!="specific" / enemy,name="specific" into the final part of the one hit kill attack from p1 to no avail....
How do i send only one character to that custom state alone?
What piece of code do i need?
If i make p2 recognize p1's name instead, how will i code it?
If i go to 5150 and a do a changestate trigger1=enemy,name="X", value=2600, he will go that custom state everytime he dies, and i want him to go that custom state only when p1 is in custom state 3150...
I hope i'm making a little bit of sense hear, i have been scratching my head on this in the past 16 hours...Trial&error killed a lot of my neurons.
何故諦める必要がある? 何を迷うことがある奪い取れ。今は悪魔が微笑む時代なんだ。
Re: Custom states
#2  June 10, 2014, 09:17:17 pm
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
Make 2 hitdefs, one that triggers to all characters except "X",  and the other one exclusive when hitting "X" character

The specific hitdef for "X" character will contain the line p2stateno = 2600
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: Custom states
#3  June 10, 2014, 10:34:12 pm
  • ***
  • 見ろ! これが執念の力だ!
    • Somalia
In the said hitdef i see this:
Code:
[state ]
type=hitdef
trigger1=animelemtime(11)%2=0
trigger1=animelem=11,>=0&&animelem=66,<0
trigger2=animelem=66
attr=s,ha
hitflag=maf
guardflag=
guard.dist=0
damage=0
getpower=0
givepower=0
animtype=light
ground.type=high
air.type=low
priority=3,hit
pausetime=0,12
ground.hittime=17
guard.hittime=17
air.hittime=1
ground.slidetime=17
ground.velocity=0
air.velocity=0,0
fall=0
numhits=0
yaccel=.6
fall.recovertime=45
ground.cornerpush.veloff=0
kill=0
sparkno=-1
hitsound=-1
guard.sparkno=-1
guardsound=-1

The attack consists in 66 punches and a 67th (and final) high kick.

After the hitdef, come a few hitsparks and then, this:
Code:
[state ]
type=assertspecial
trigger1=animelem=67,<0
flag=noko
[state ]
type=targetstate
trigger1=numtarget
trigger1=movehit=1||animelemtime(11)%2=1
trigger1=animelem=11,>=0&&animelem=66,<0
value=3152
[state ]
type=targetstate
trigger1=numtarget
trigger1=animelem=66,>0
trigger1=movehit=1
value=3153
[state ]
type=targetstate
trigger1=numtarget
trigger1=animelem=67
value=3154
[state ]
type=envshake
trigger1=animelemtime(11)%4=0
trigger1=animelem=11,>=0&&animelem=66,<0
time=2
ampl=10
freq=60
phase=90
[state ]
type=envshake
trigger1=animelem=66
time=24
ampl=12
freq=75
phase=90

States 3152 and 3153 are moving p2 from p1's position onscreen.
State 3154 from that last targetstate does this:

Code:
[statedef 3154]
movetype=h
[state ]
type=changeanim
trigger1=1
value=5030
[state ]
type=nothitby
trigger1=1
value=sac
time=1
[state ]
type=velset
trigger1=time>=15
x=-7
y=-9
[state ]
type=selfstate
trigger1=time>=15
value=5050

From what i've figured, state 3154 is the one that kills p2...

     Posted: June 11, 2014, 07:52:04 pm
Make 2 hitdefs, one that triggers to all characters except "X",  and the other one exclusive when hitting "X" character

The specific hitdef for "X" character will contain the line p2stateno = 2600

Can you please make it a little more simpler than that?
Am i supposed to do something like:

Code:
[state ]
type=hitdef
trigger1=enemy,name!="x"
bla-bla

and right below it

Code:
[state ]
type=hitdef
trigger1=enemy,name="x"
[....]
p2stateno=2600
?

何故諦める必要がある? 何を迷うことがある奪い取れ。今は悪魔が微笑む時代なんだ。
Last Edit: June 11, 2014, 07:52:04 pm by Lord Mike
Re: Custom states
#4  June 11, 2014, 10:56:38 pm
  • *****
  • Shame on you!
    • USA
I would make a variable to watch who I was playing. Var(9). It would =1 when I'm fighting "specific". I would either make 2 hitdefs or make 2 entire statedefs for this 1 hit 1 kill move. In the commands I'd have
[State -1, Shinku Hadou Ken]
type = ChangeState
value = 3150+Var(9)
where statedef 3150 is normal, and 3151 is for "specific"
vVv Gouken718 vVv