News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Double impact code problem

Started by Momotaro, May 29, 2010, 02:53:51 PM

Previous topic - Next topic

Momotaro

Hi,
For my game system I use a simultaneous hit code (I'm still working on it...)
It results on various effects when the triggers are ok. (Pause, explod, playsnd)
for the 3 "effects" the triggers are the same

Exemple of the triggers for the snd fx on state -2

[State -2, snd double hit];double hit
type = PlaySnd
triggerall = time = 0;only on the first frame
triggerall = prevstateno != [5000,5999]
triggerall = enemynear,prevstateno != [5000,5999]
trigger1 = stateno = 5000; stand damages
trigger1 = enemynear,stateno = 5000;P2 stand damages
value = F5, 26;23
volume = 70
ignorehitpause = 1

The code works well, because it detects when both characters are in stand damage states.
But in my project, there is some helpers characters who can hit both p1 and p2.
And when a helper hit p1 and p2 simultaneously, it triggers the effects.
How can I prevent it? (the helpers are generated by both p1 and p2)

thanks in advance.

Cyanide

Check the ID of the helper.

numhelper(9804) = 0
enemynear(0), numhelper(9804) = 0

You can't really redirect further than that. Most of the time you'd turn on a variable when a counter hit is possible. The helper wouldn't turn on the var, so it would remove the possibility of countering.


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.

Momotaro

So I have to trigger all the helpers of p1 of p2 with thus code, right?