Striker tutorial (helpers) (advanced) - .CNS Coding help - Code Library - Blaze mugen forums
Tuesday, 2009-11-24, 1:37 Pm
Welcome Guest

Blaze M.U.G.E.N

Blaze mugen forums

[New messages · Members · Forum rules · Search · RSS ]
Page 1 of 212»
Blaze mugen forums » Code Library » .CNS Coding help » Striker tutorial (helpers) (advanced) (want to understand how helpers work?)
Striker tutorial (helpers) (advanced)
Sir_KillzalotDate: Saturday, 2007-12-15, 8:42 Pm | Message # 1
MuGeN Expert
Group: Users
Messages: 349
Reputation: 12
Status: Offline
Ok seeing as we do not have any tutorials on helpers yet I will make one

Note: Helper is probably the most versitle thing there is in mugen and to trully understand it youmust experiment yourself to trully grasp potential.

Here are some examples of what helpers can do: ai clone that can fight beside you, fixed prodjectile, beams, explosions, prodjectiles that stick to the ground than explode, sparks(but it is better to use explods), and strikers(appear,hit,vanish)

(if anyone has questions on how to do those things with helpers feel free to ask)

Ok now on with the tutorial.

there are three basic states that you must need to create a striker: a appear state,a attack state,and a destroy state. anything else is optional but can make the striker more useful, efficent, or look better graphically.

1.creating a striker
make a move that you wish for the helper to be created, can be anything, this is the move I used to create shadow clone for naruto. (I will explain all the commands shown under the helper state a little later)

ex: (don't copy code for my setup is different)

Code

[StateDef 240]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 240
poweradd = 20
sprpriority = 2

[State 240, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal ;player
name = "Clone"
ID = 1
stateno = 241
pos = -60,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove

[State 240, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

So you are looking what in the world do all those commands under the helper state mean well here you are:

;state #, title (you should know how these work already)
[State 240, Helper]

;type needs to be helper for this state to create a helper
type = Helper

is when you want the striker to appear
trigger1 = animelem = 4

;normal = helper can go off the screen. player = cannot go off the screen(I would never use this)
helpertype = normal ;player

;whatever you wish to call the helper (doesn't matter)
name = "Clone"

;id in which to refer to this helper (used to refer this helper by in other states)
ID = 1

;State in which the helper starts off in
stateno = 241

;offset, how far away you wish the helper to appear from what is specified by postype, use the ruler button in ff to determine the exact offset (explained in projectile tutorial)
pos = -60,0

;p1 = everything in reference to p1 position, p2 = same as p1 except in reference to p2, front = in reference to the side p1 is facing, back = opposite of front, left = left side of screen, right = right side of screen
postype = p1 ;p2,front,back,left,right

;1 = face direction as whatever postype is unless postype is left or,right then 1 means face right
;-1 = opposite direction of whatever postype is unless postype left or right than -1 means face left
facing = 1

;0 = does not have accses to state -1 and cannot read commands from player (e.x. joypad or keyboard
;1 = does have accsses to state -1 and can read commands from player
keyctrl = 0

;0 = inherits parent's pallete (same as player)
;1 = inherits it's own pallete
ownpal = 0

;the number this is equal to is the number of ticks helper is unfrozen during a super pause
supermove ;not shown but can equal a number

; the number of seconds helper is unfrozen during a pause
pausemove ;not shown but can equal a number

;there are more commands but you can find what they do here or a more deep insight on the commands I explained:
click on helpers

2.appear state:
Now that you know how to call a helper I will give you a basic feel on how a helper works.
here is my code of my naruto appear state:

Code

[StateDef 241]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
anim = 241
poweradd = 0
sprpriority = 0

[State 241, 1]
type = changestate
trigger1 = time = 12
value = 242

you are probably going "wtf? it doesn't do anything" but in reality you do not want your helper to just appear somewhere, you would almost always want some kind of enterance for the helper (comming from off the screen counts) in mine I use a smoke animation (even though my real code has some more things in it. I took them out to make the code smaller). And in my real code there are about five different changestates with random commands to have several clone Ai personalities (that's right you can code Ai for these but it is quite difficult and if you want to know how I did it hust ask).

3.attack state:
Very straightford. Just create a statedef and under it a hitdef state (very simple)

4.vanish state:
In reality you could include this at the end of your attack state(with a way for the helper to exit without it just blinking away). But in my code it was way more efficent to create one end point from the several paths.

all you really need to know is that this state must be included at some point of your code(you can't have them leave the screen and just leave them there for there is a maximum on the amount of helpers and they will still count for that total)

[State 244, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0 ;any trigger you want.

...and this will destroy the helper when you are finished wth it.

So to sum things up on strikers: they must have a beggining point + end point, no matter what. You could make a very big web of code with many differents path but at some point there must be a beggining and an end.

If you have any questions feel free ta ask and I will do my best to get rid of any problem you face.

 
Naruto12blooDate: Sunday, 2007-12-16, 6:09 Pm | Message # 2
MuGeN Mayhem
Group: Users
Messages: 195
Reputation: 5
Status: Offline
Now that is alot of help people were making that so complicated great code your awesome
 
Sir_KillzalotDate: Sunday, 2007-12-16, 6:24 Pm | Message # 3
MuGeN Expert
Group: Users
Messages: 349
Reputation: 12
Status: Offline
thanks I think that covers everything except beams.
 
Naruto12blooDate: Monday, 2007-12-17, 1:46 Pm | Message # 4
MuGeN Mayhem
Group: Users
Messages: 195
Reputation: 5
Status: Offline
yep they're so complicated but easy at the same time oh and here try another tutorial on palettes people really don't get those or if you can't I will if you have any extra info
 
Sir_KillzalotDate: Monday, 2007-12-17, 10:05 Pm | Message # 5
MuGeN Expert
Group: Users
Messages: 349
Reputation: 12
Status: Offline
To tell you the truth I have yet to mess with the options that deal with palletes yet (so somebody else will have to make a tutorial on that one).
 
OmnifoxDate: Tuesday, 2008-01-01, 3:05 Pm | Message # 6
MuGeN Mayhem
Group: Users
Messages: 174
Reputation: 3
Status: Offline
sweet tutorial man.

I could only understand part of it though lol but thats my fault i still need more exp.


Current W.I.P. :

.... still have not added all the required sprites yet. <_<

 
Sir_KillzalotDate: Thursday, 2008-01-03, 2:09 Pm | Message # 7
MuGeN Expert
Group: Users
Messages: 349
Reputation: 12
Status: Offline
It looks alot more complicated then it really is. It may take a little time to get the hang of. But once you get the hang of it it becomes easy.
 
OmnifoxDate: Thursday, 2008-01-03, 5:38 Pm | Message # 8
MuGeN Mayhem
Group: Users
Messages: 174
Reputation: 3
Status: Offline
I'll take your word for it.

Current W.I.P. :

.... still have not added all the required sprites yet. <_<

 
Sub1117Date: Sunday, 2008-02-17, 12:59 Pm | Message # 9
MuGeN FaN
Group: Users
Messages: 62
Reputation: 0
Status: Offline
does the palette of the striker have to be on the main palette?

go to my myspace!!
my email = Sub17@aol.com


 
Sir_KillzalotDate: Sunday, 2008-02-17, 1:26 Pm | Message # 10
MuGeN Expert
Group: Users
Messages: 349
Reputation: 12
Status: Offline
No. There is a option somewhere in the helper code that aloows it to use it's own pallete
 
Sub1117Date: Sunday, 2008-02-17, 2:57 Pm | Message # 11
MuGeN FaN
Group: Users
Messages: 62
Reputation: 0
Status: Offline
it doesnt work am i doing something wrong? (i think i am...alot)

Code


[StateDef 834]
type = S
movetype = A
physics = S
juggle = 0
anim = 834
ctrl = 0

[State 834, Helper]
type = Helper
trigger1 = time = 3
ID = 835
pos = -55,0
postype = back
stateno = 835
helpertype = normal
name = "kratos"
keyctrl = 0
ownpal = 1
supermovetime = 1

[State 834, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 10000]
type = S
movetype = I
physics = N
anim = 835
velset = 4.7,0
ctrl = 0

[State 10000, 1]
type = HitOverride
trigger1 = time = 0
time = -1
attr = SCA, AA, AT, AP
slot = 0
stateno = 10003

[State 10000, 2]
type = sprpriority
trigger1 = Time = 0
value = 9999999

[State 10000, 4]
type = ChangeState
trigger1 = RootDist X <= -30
value = 10002

[State 10000, 5]
type = VelSet
trigger1 = RootDist X <= -30
x = 0
y = 0

[Statedef 10002]
type = S
movetype = A
physics = S
anim = 836
velset = 0,0
ctrl = 0

[State 10002, 1]
type = Projectile
trigger1 = AnimElem = 901
projanim =900
projhitanim = 902
projhits = 20
projmisstime = 4
projshadow = -1
projpriority = 30
projremovetime = 150
projheightbound = -240, 100
projedgebound = 100
projscreenbound = 100
projid = 6004
velocity = 0.001
offset = 0,15
attr = S, HP
damage =35
animtype = heavy
guardflag = MA
hitflag = MAFDP
pausetime = 1,5
hitsound   = 5,2
sparkxy = 500,500
guardsound = 6,0
ground.type = High
ground.slidetime = 25
ground.hittime  = 25
ground.velocity = -10,-2
air.animtype = Back
air.velocity = -10,-2
air.recover = 0
air.fall = 1
down.velocity = -10
down.hittime = 30
down.bounce = 1
fall = 1
fall.recover = 0

[State 10002, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 10001

[Statedef 10001]
type = S
movetype = I
physics = N
anim = 837
velset = -4.7,0

[State 10001, 1]
type = Veladd
trigger1 = Time > 0
x = 0
y = 0

[State 10001, win]
type = ChangeState
trigger1 = win = 1
value = 10006

[State 10001, lose]
type = ChangeState
trigger1 = Lose = 1
value = 10007

[State 10001, 3]
type = DestroySelf
trigger1 = BackEdgeBodyDist < -35

[Statedef 10003]
type = A
movetype = I
physics = N
anim = 838
velset = -4,-4,0

[State 10003, 1]
type = Gravity
trigger1 = time >= 0

[State 10003, 2]
type = ChangeState
trigger1 = Pos Y >= -1
trigger1 = Pos Y > 0
value = 10004

[Statedef 10004]
type = S
movetype = I
physics = N
anim = 0
velset = 0,0

[State 10004, 1]
type = Gravity
trigger1 = Time >= 32

[State 10004, 2]
type = ChangeState
trigger1 = animTime = 0
value = 10005

[Statedef 10005]
type = S
movetype = I
physics = N
anim = 0
velset = 0,0

[State 10005, 2]
type = ChangeState
trigger1 = animTime = 0
value = 10001

[Statedef 10006]
type = S
movetype = I
physics = N
anim = 0
velset = 0,0

[State 10006, 1]
type = DestroySelf
trigger1 = animTime = 3

[Statedef 10007]
type = S
movetype = I
physics = N
anim = 0
velset = 0,0

[State 10007, 1]
type = DestroySelf
trigger1 = animTime = 3



go to my myspace!!
my email = Sub17@aol.com


 
Sir_KillzalotDate: Sunday, 2008-02-17, 6:50 Pm | Message # 12
MuGeN Expert
Group: Users
Messages: 349
Reputation: 12
Status: Offline
[State 10000, 2]
type = sprpriority
trigger1 = Time = 0
value = 9999999 <----THIS SHOULD BE 6

Also, what does the error say? It will help me alot by telling us where to look for the problem.

 
Sub1117Date: Sunday, 2008-02-17, 7:10 Pm | Message # 13
MuGeN FaN
Group: Users
Messages: 62
Reputation: 0
Status: Offline
no error, he just doesnt appear at all :/

go to my myspace!!
my email = Sub17@aol.com


 
Sir_KillzalotDate: Monday, 2008-02-18, 3:55 Pm | Message # 14
MuGeN Expert
Group: Users
Messages: 349
Reputation: 12
Status: Offline
[State 834, Helper]
type = Helper
trigger1 = time = 3
ID = 835
pos = -55,0
postype = back
stateno = 835 <--- this should be the state in which the helper starts at.

So if that state doesn't exist the helper won't appear.

 
Sub1117Date: Sunday, 2008-03-02, 9:06 Pm | Message # 15
MuGeN FaN
Group: Users
Messages: 62
Reputation: 0
Status: Offline
okay, im making a new striker but i dont get this part

Quote
[StateDef 241]
type = S
movetype= A
physics = S
juggle = 1
velset = 0,0
anim = 241
poweradd = 0
sprpriority = 0

[State 241, 1]
type = changestate
trigger1 = time = 12
value = 242

i dont get the vale at the end of the changestate, what do you put there? and after you do everything in the cns, what do you do in the cmd?


go to my myspace!!
my email = Sub17@aol.com




Message edited by Sub1117 - Sunday, 2008-03-02, 9:10 Pm
 
Sir_KillzalotDate: Monday, 2008-03-03, 3:57 Pm | Message # 16
MuGeN Expert
Group: Users
Messages: 349
Reputation: 12
Status: Offline
the value is the state in which the character enters

Look at any ground punch/kick state and you will see a changestate to the 0 state (in other words the basic stand state)

for cmd code look at the tutorial on projectiles and the cmd code should be the same for making an attack that creates a helper.

 
sasuke17Date: Monday, 2008-05-19, 7:23 Pm | Message # 17
Begginer
Group: Users
Messages: 7
Reputation: 0
Status: Offline
hi sir well im good using helpers , but i ve made a vbunshin and i need to make IA for them this is what i got so far

[Statedef 15001]
type = S
physics = S
sprpriority = 0

[State 0, HitOverride]
type = HitOverride
trigger1 = time = 0
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 15010
time = -1

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 402
pos = 0,0
postype = p1 ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
ontop = 1
ownpal = 1

[State 0, Changestate]
type = Changestate
trigger1 = time = 3
value = 15000

[Statedef 15000]
type = S
physics = S
sprpriority = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, VelSet]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, VelSet] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[State 0, Turn]
type = Turn
trigger1 = p2bodydist x <=-20

;--|Changestates|-----------------------------------------------------------
[State 0, Combo]
type = ChangeState
trigger1 = p2bodydist x <= 25
value = 15200
ctrl = 1

[State 0, Kunai]
type = ChangeState
triggerall = p2bodydist x > 95
trigger1 = random < 80
value = 15480
ctrl = 1

[State 0, Walk]
type = ChangeState
triggerall = !(p2bodydist x > 100)
triggerall = p2bodydist x > 60
trigger1 = random < 100
value = 15020
ctrl = 1

[State 0, Walk back]
type = ChangeState
triggerall = p2bodydist x < 0
trigger1 = random < 100
value = 15021
ctrl = 1

[State 0, Run]
Type = ChangeState
triggerall = p2bodydist x > 100
trigger1 = random < 150
value = 15100
ctrl = 1

[State 0, Die when lose]
type = Changestate
trigger1 = parent, life = 0
value = 15009

[State 0, Die when win]
type = Changestate
trigger1 = p2life = 0
value = 15009
;--|!Changestates|-----------------------------------------------------------
;-----------------------------------------------------------------------
[Statedef 15020]
type = S
physics = S
sprpriority = 0

[State 20, 1]
type = VelSet
trigger1 = 1
x = const(velocity.walk.fwd.x)

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 5
value = S100,0
volume = 800

[State 0, ChangeState]
type = ChangeState
trigger1 = p2bodydist x < 40
value = 15000
ctrl = 1

;-----------------------------------------------------------------------
[Statedef 15021]
type = S
physics = S
sprpriority = 0

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21

[State 20, 2]
type = VelSet
trigger1 = 1
x = const(velocity.walk.back.x)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 5
value = S100,0
volume = 800

[State 0, ChangeState]
type = ChangeState
trigger1 = time > 80
value = 15000
ctrl = 1
;--------------------------------------------------------------------
[Statedef 15100]
type = S
physics = S
anim = 100
sprpriority = 1

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x) + 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
trigger2 = animelem = 4
value = S100,0
volume = 800

[State 100, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 0, Run]
type = ChangeState
triggerall = p2bodydist x < 25
trigger1 = random < 200
value = 15220
ctrl = 1

[State 100, 4]
type = ChangeState
trigger1 = time > 80
value = 15000
;------------------------------------------------------------
[Statedef 15200]
type = S
movetype= A
physics = S
juggle = 4
poweradd= -300
ctrl = 0
velset = 0,0
anim = 745

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 10,14
volume = 800

[State 0, Helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal ;player
name = "wood1"
stateno = 15201
pos = 0,0
postype = p1 ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-----------------------------------------------------------------------
[Statedef 15201]
type = S
movetype= A
physics = S
juggle = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim = 746

[State 0, PosAdd]
type = PosAdd
trigger1 = time = 0
x = p2dist x + 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 9
value = 310,0
volume = 800

[State 200, 1]
type = HitDef
trigger1 = animelem = 4
trigger2 = animelem = 5
trigger3 = animelem = 6

attr = S, NA
damage = 30, 0
animtype = medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 40
sparkno = 10456
sparkxy = -15, -35
hitsound = 456200, 3
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime = 12
ground.velocity = -1
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-0
air.hittime = 12
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 210, 5]
type = destroyself
trigger1 = AnimTime = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 654,0
volume = 800

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 10,0
volume = 800

[State 0, Combo]
type = ChangeState
trigger1 = movehit
value = 15210
ctrl = 1

[State 210, 5]
type = destroyself
trigger1 = AnimTime = 0
value = 15000
ctrl = 1
;--------------------------------------------------------------------------

;------------------------------------------------------------------------
[Statedef 15210]
type = S
movetype= A
physics = S
juggle = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 210

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 10,21
volume = 800

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 654,2
volume = 800

[State 0, Combo]
type = ChangeState
trigger1 = movehit
value = 15220
ctrl = 1

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 23, 0
animtype = medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 20
sparkno = 10
sparkxy = -15, -35
hitsound = s200, 3
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime = 12
ground.velocity = -1
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-0
air.hittime = 12

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 15000
ctrl = 1
;---------------------------------------------------------------------
[Statedef 15220]
type = S
movetype= A
physics = S
juggle = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 220

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 654,2
volume = 800

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 10,1
volume = 800

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 30, 0
animtype = medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 8
sparkno = 2
sparkxy = -15, -35
hitsound = s200, 1
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime = 45645
ground.velocity = -8,-7
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -8,-7
air.hittime = 46545
fall = 1

[State 220, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 15000
ctrl = 1
;---------------------------------------------------------------------
[Statedef 15480]
type = S
movetype= A
physics = S
juggle = 4
poweradd= -500
ctrl = 0
velset = 0,0
anim = 445

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 10,14
volume = 800
[State 0, Helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal ;player
name = "wood5"
stateno = 446
pos = 0,0
postype = p2 ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 15000
ctrl = 1

[StateDef 15009]
type = S
movetype= A
physics = S
juggle = 1
velset = 0,0
ctrl = 0
anim = 5000
poweradd = 0
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 10
value = 12,3
volume = 800

[State 0, Helper]
type = Helper
trigger1 = time = 10
stateno = 15008
pos = 0,0
id = 15008
postype = p1 ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
ontop = 1

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
;value2 = S,NA
time = 2

[State 15008, end]
type = destroyself
trigger1 = time = 10
value = 0
ctrl = 1

[StateDef 15010]
type = S
movetype= A
physics = S
juggle = 1
velset = 0,0
ctrl = 0
anim = 5000
poweradd = 0
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 10,7
volume = 800

[State 0, HitOverride]
type = HitOverride
trigger1 = time = 0
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 15009
time = -1

[State 15008, end]
type = changestate
trigger1 = time = 20
value = 15000
ctrl = 1

[StateDef 15008]
type = S
movetype= A
physics = S
juggle = 1
velset = 0,0
ctrl = 0
anim = 1500
poweradd = 0
sprpriority = 2

[State 200, 1]
type = HitDef
triggerall = time < 15
trigger1 = Time = 0
attr = S, NA
damage = 50, 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 8
sparkno = 450
sparkxy = -10, -35
hitsound = 45200, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime = 12
ground.velocity = -1
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-0
air.hittime = 12
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1

[State 15008, end]
type = destroyself
trigger1 = animtime = 0

;-----------------------------------------------------------------
[Statedef 15102]
type = S
physics = S
anim = 100
sprpriority = 1

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x) + 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
trigger2 = animelem = 4
value = S100,0
volume = 800

[State 100, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 0, HitOverride]
type = HitOverride
trigger1 = time = 0
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 15009
time = -1

[State 0, Run]
type = ChangeState
triggerall = p2bodydist x < 25
trigger1 = random < 200
value = 15222
ctrl = 1

[State 100, 4]
type = ChangeState
trigger1 = time > 80
value = 15009
;---------------------------------------------------------------------
[Statedef 15222]
type = S
movetype= A
physics = S
juggle = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 220

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 654,2
volume = 800

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 10,1
volume = 800

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 30, 0
animtype = medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 50
sparkno = 2
sparkxy = -15, -35
hitsound = s200, 1
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime = 45645
ground.velocity = -8,-7
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -8,-7
air.hittime = 46545
fall = 1

[State 220, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 15009
ctrl = 1

but my bunshin stops after the state 15200 or 15480 waht i should do???

and i want to make to use all the attack of my char but ramdomly

thank for your help!!!!!!!!!!

 
Sir_KillzalotDate: Wednesday, 2008-05-21, 7:51 Pm | Message # 18
MuGeN Expert
Group: Users
Messages: 349
Reputation: 12
Status: Offline
what I did to make ai for the helpers I made is to have a neutral state (stand state) in which a random state is picked (with other conditions of course) with an action associated with it. When the computer is done with the move it returns to the neutral state and the process starts over.
 
99oddDate: Monday, 2008-07-21, 1:39 Am | Message # 19
MuGeN General
Group: Users
Messages: 84
Reputation: 0
Status: Offline
srry to say but i don't understand it's to advanced for me so can sum1 explain it to me in simpler terms and a vid wit help

Message edited by 99odd - Monday, 2008-07-21, 11:19 Pm
 
Sir_KillzalotDate: Wednesday, 2008-07-23, 8:01 Pm | Message # 20
MuGeN Expert
Group: Users
Messages: 349
Reputation: 12
Status: Offline
I tried to explain it as well as I could as simple as I could. Do you happen to understand parts of it or is it that you can't understand any of it at all. I will try to help you understand it so just ask as many questions as you like.
 
Blaze mugen forums » Code Library » .CNS Coding help » Striker tutorial (helpers) (advanced) (want to understand how helpers work?)
Page 1 of 212»
Search:

Login form
E-mail:
Password:
Site friends
Site Admins
Blazeinc (A.K.A UrOz)
Our poll
which character series are the best for mugen
Total of answers: 1007
Created By UrOz | Blazeinc