removeexplod *SOLVED*

Started by sgn15, August 27, 2011, 04:10:33 PM

Previous topic - Next topic

sgn15

situation:
4 of the same helper with IDs 1,2,3,4 has 900 (idle), 903 (damage checker), 904 (attack) states
each of the helper has the explods 901 and 902

i need a trigger for removeexplod when the distinct corresponding helper is already non-existing on the game (or screen)

so when helper ID 1 is not on the match anymore, only the explod of helper ID 1 will disappear. explod of numhelper 2 will disappear only when helper ID 2 is non-existent anymore. and so on. you get the idea

the code in bold doesnt work  :-\

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = (stateno != 900 || stateno != 903 || stateno != 904) && numexplod(901) = 1
trigger1 = (numhelper(1) = 0) || (numhelper(2) = 0) || (numhelper(3) = 0) || (numhelper(4) = 0)
id = 901
;ignorehitpause =
;persistent =

Алексей

#1
I take it that RemoveExplod is in your helper's state? If so, try using trigger redirection to redirect NumHelper to the root.

Example:
!root,NumHelper(1)

In the event that this code is not in your helper and you're looking to check your Helper's states, then use trigger redirection on those stateno triggers instead.

Example:

trigger1 = helper(1),stateno!=[900,904]
trigger1 = helper(2),stateno!=[900,904]
trigger1 = helper(3),stateno!=[900,904]
trigger1 = helper(4),stateno!=[900,904]

-[Все слова это только слова.]-

sgn15

both the helper sctrls and removeexplod are in state -2 (since the helper are called by either in intro or when match starts/intro skipped)

i think it worked? i tried the char in watch mode lol

sgn15

#3
well more testing showed that the removeexplod doesnt work. Ill explain the situation in more detail.  the helper is called at state 900, then goes to 903 when hit and adds the damage to a var, if the var is at least 300, it goes to 904, if its not 300 at least, then it goes back to 900.

now another situation is when the gametime has elapsed X number of ticks, the helper 900 will automatically go to 904 (attack)

in both situations above, once it uses state 904 once, it will destroyself

now i tried using gametime = 600 (10 ticks) for easier testing, it revealed that when the helper goes to 904 due to the gametime trigger, the explod doesnt disappear, instead, it goes to the ground level. (the helpers are originally at sky level the whole duration of the match)

any solutions?

edit:
another problem i found. so when it goes to 904 and disappears (the helper),....... i have one attack in state 210 where i call a projectile coded as helper, this helper state 211 (ID is 211 also) also calls the explod 901 and 902. wtf. i checked and the only 211 i found in my whole cns were the code in my helper state 211

the 210 and 211 states have absolutely nothing to do with the helper 900

another edit:

actually the problem isnt only with 211 helper. ALL my HELPERS are calling those explods 901 and 902 right after the helper 900 goes to 904 thru gametime = 600 trigger. so its a bug thats common to ALL HELPERS.

any idea?

Cyanide

The explods are owned by the helpers. Have the helpers manage their removal. Not the player or state -2.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

sgn15

#5
well i put these codes in their respective states (900,903,904)

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 900
id = 901

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 900
id = 902
;ignorehitpause =
;persistent =

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 903
id = 901

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 903
id = 902
;ignorehitpause =
;persistent =

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 904
id = 901

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 904
id = 902
;ignorehitpause =
;persistent =

and only 2 out of the 4 helpers have their explods removed when it goes to 904 thru the gametime trigger

edit: fixed