News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

coding help

Started by IEatRamen, January 24, 2008, 05:49:46 AM

Previous topic - Next topic

IEatRamen

i need to know what to use to make a certain animation stay on the character for a certain amount of time, thank you

Bastard Mami

you use a explod, you are welcome

Leon Belmont

Or you could make a helper that uses a bind sctrl, and make it destroyself after the allocated time. The reason why I suggest this is because helpers are more flexible than explods, in case you want to give it extra stuff in the future and you won't have to re-code it.


mug3nM8n

hi im in need of some help, im coding a move, but its not going to well,   the move is a tazer attack(electric gun) how the move works is the attempt animation plays 5 frames, and on the 5th frame is a red collision box, well when the opponent walks inside that area i want the success animation to play and hit him but, when i change state it keeps looping the animation can someone give me some advice.......i could post the code if nessecary

mug3nM8n

here is the code:

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

[State 666, 1]
type = HitDef
trigger1 = AnimElem = 5
attr = S, SA
damage = 5
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10, 10
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 666, end]
type = ChangeState
trigger1 = movecontact
value = 777
ctrl = 0

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

[State 777, 1]
type = HitDef
trigger1 = AnimElem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
attr = S, SA
damage = 5
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10, 10
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

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


the problem is it keeps looping animation 666 when i dont do it near the opponent and i want it do just play the 5 frames, then if near the opponent it hits play anim 777 which has 3 hits

Fallen_angel

on statedef 666 you need to add another changestate .. that activates when you havent made contact with the opponent

mug3nM8n

ok cool i dont suppose you could tell me that code please? ::)