News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Stumped on a trigger : /

Started by dsm33606, July 07, 2009, 10:34:25 PM

Previous topic - Next topic

dsm33606

Hey guys and gals, Im stuck trying to figure out a proper trigger for my helper.. I want it to destroyself when a certain animations time is over..so far I came up with this and its not working:

[State 4400, DestroySelf]
type = DestroySelf
trigger1 = anim != 230

Thanks in advance all

Byakko

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.

dsm33606

Didnt work, thanks for the response though

Rajaa Retired

Does the animation have a frame time of  -1 anywhere?

Post your animation.

If anything, the trigger you are looking for is, actually, very simple.

Time

^Click it

dsm33606

[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim = 230
sprpriority = 9

[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 255,10,0
invertall = 0
color = 256
;ignorehitpause =
;persistent =

[State 230, PowerAdd]
type = PowerAdd
trigger1 = ((GameTime%2) = 0) && (command = "hold_a")
value = 4

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


[State 230, End]
type = ChangeState
trigger1 = (command != "hold_a")
value = 0
ctrl = 1

[Statedef 4400]
type    = S
movetype= A
physics = S
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim = 4400


[State 4400, DestroySelf]
type = DestroySelf
trigger1 = !animtime   

Byakko

Post anim 4400. The animation itself, from the .air file. Unless the animation loops / never ends, this should work and the helper should be destroyed as soon as anim 4400 is over.
By the way, for the record, when you tried anim != 230, what was wrong was that the helper isn't playing anim 230, the parent is.
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.

dsm33606

ahh the animation does loop but I kinda need it to do so, since its a charge up move

Byakko

.... So... when exactly do you want the helper to disappear ? When the animation is over ? Even though you never want it to be over ?
if it's a power charge move (like DBZ or like KoF's Extra mode) you want it to disappear when the parent (i.e. the character) isn't in power charge anymore. The trigger for that is "parent,anim != [character in power-up animation]".
For more info, look up "trigger redirection" in the docs. Basically, as the character and his helper are two different "objects", the trigger redirection allows an object to look up anothe object's parameter (such as his animation, velocity...) Trigger redirection can be done with parent, enemy, enemynear, root, helper...
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.

dsm33606

That worked perfectly! Thanks alot Byakko! and thanks to you too Rajaa :D

Rajaa Retired

Use the trigger I posted according to how much time you want it to last.


Time > 20, it'll last for 20 ticks and then destroy itself.

But aside from you knowing that now, since this is a charge move and you don't need the helper anymore once charging is over. triggers you need should look like this:


Parent, anim != 230

Parent, stateno != 230


No problem.  :sugoi: