Jump to content
  • 0

How to make parent knock around a helper ball?



Wario drop's a bob-omb on the ground, which sits, blinks, winds up, hops and repeats a couple times before exploding. 
I've gotten it so the opponent can knock it around the screen using hitoverride and gethitvar(xvel and yvel).

Now I'd like Wario to be able to hit it, without adding an additional hitdef with "affectteam = F" to every single attack he has.

As of now, I've got an extra hitdef in each of the basic attack states with affectteam = f, strictly for the bob-omb....maybe the coal too?

__/ Considerable approaches so far

1. An extra hitdef in state -2 (with affectteam = F) that triggers when the helper is present and Wario's in an attack state.  It does allow Wario to hit the bob-omb, but when it's activated it messes with his other regular hitdefs for some reason, making it so they don't affect the opponent.  Furthermore, it only allows that single velocity to be imparted to the bob-omb, rather than whatever velocity would naturally come with the specific attack.

2. This one's completely impractical:  First have Wario create a bobomb, then have a screenwide hit that puts p2 in a custom state for 1 tic, causing them to produce a helper that's just a hitbox and bind it to the bobomb.  Then, only when it's hit (by Wario), have it bind the bobomb to itself. 

3.  Just put an additional hitdef in each of Wario's attacks just for the bobomb.  This creates the same problem as the -2 hitdef, where it apparently deactivates the original hitdef.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

After an arduous day of picking away at this, I've pretty much gotten it working. 

There were some interesting issues that prevented easier ways of doing things that I'm going to list for reference sake.
They've all been double / triple / quadruple checked with the in game clipboard:

trigger = target(hit_id), id = helper(helper_id)  does not work. 

trigger = target(hit_id) = "whatever it was set to in the hit def" does not work.

trigger = numtarget(helper id) does not work.

trigger = numtarget(target id from hitdef) does not work.

movecontact returns 0 after the hit connects with the bob-omb helper.

Any of these would have allowed the original hitdef (meant for the opponent) to retrigger after the bob-omb one connected.  The apparent issue here is that mugen will not recognize a helper as a target, or even a legitimate point of "contact" for a hit.

I considered adding an extra hitdef to each of Wario's basics which triggers 1 tick before the normal hitdef.  Of course that meant adding a new clsn to every basic attack as well, right before the normal one. 

In the end I had the bob-omb use ParentVarSet to let Wario know if it was in hit range.  There's an additional hitdef added to each one of his basics that triggers only on the first tick of the hit if that var is non-zero.  The original hitdef then retriggers immediately.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...