The Mugen Fighters Guild

Help => M.U.G.E.N Development Help => Topic started by: junkerde on March 07, 2019, 10:24:31 pm

Title: Want to hit my own helper, but not affect my team
Post by: junkerde on March 07, 2019, 10:24:31 pm
.
Title: Re: Want to hit my own helper, but not affect my team
Post by: Just No Point on March 08, 2019, 12:04:23 am
You’ll probably need to replicate it by coding the interactions into the projectiles. Using proximity to the helper to detonate it.
Title: Re: Want to hit my own helper, but not affect my team
Post by: ESFAndy011 on March 08, 2019, 12:14:46 am
Like JNP said, it sounds like you're gonna have to use proximity to emulate a hit between the projectile and the gas cloud.

Since there is no direct way to measure the distance between two helpers, go to your gas cloud and projectile helpers and add ParentVarSet state controllers (different variable from each helper) that will constantly indicate their positions in X (this is assuming you're not using projectiles that can be shot down at an angle, that could get trickier since you'd need two more variables for pos y). The character will also have to have a variable that indicates the distance itself. Once that variable reaches a value that would represent a projectile being at hitting distance from the cloud, then you go to your projectile and make it changestate to its "death" animation. Add a playsnd for the hit and an explod for the hitspark, if any.

I strongly recommend you register the result as an absolute. so from the projectile, it'd be more or less like so:

(This is assuming you're using var(15) for the cloud position, var(16) for the projectile position and var(17) for the distance)

Code:
[State 1000, ChangeState]
type = ChangeState
trigger1 = parent,var(17) <= abs(parent, var(15) - parent, var(16))
value = 1001

Hope we helped!

P.S: Mods, sorry for the double editing, forgot the damn code tags
Title: Re: Want to hit my own helper, but not affect my team
Post by: junkerde on April 17, 2019, 09:05:35 am
.
Title: Re: Want to hit my own helper, but not affect my team
Post by: Speedpreacher on April 21, 2019, 07:52:16 pm
Hey. Don't remove your posts like that. In general it makes it hard to follow a conversation and is terrible. On this board in particular it makes it impossible for anyone else to benefit from this topic because now they won't have any idea if your problem actually matches theirs or not. Do this again and see the ability removed for good.