YesNoOk
avatar

Create Helper on each Individual Hit in an Attack (Read 147 times)

Started by PineappleProducer, December 11, 2014, 05:17:35 pm
Share this topic:
Create Helper on each Individual Hit in an Attack
#1  December 11, 2014, 05:17:35 pm
  • ***
  • My username has a history to it.
    • USA
    • pineappleproducer.webs.com/
Hey, everyone. So this may be a simple fix, but here's my conundrum:

I have a projectile that hits multiple times (approximately 55 times), and I wanted a particle-esque effect in addition to the standard hitspark. So, I used the Helper state controller for the particles and came up with the following code:

Spoiler, click to toggle visibilty

This seemed to work fine, but upon closer observation, I discovered that the particles still spawn, even if the opponent is no longer being hit by the projectile, as long as they were hit at some point by it. I suspect it is the movehit in the code that is the culprit, but I don't know if there exists a way to specify a successful hit for a individual frame of the attack. If anyone could help, I'd be utmost appreciative. Thank You!
*I have an uncle who can't grasp why Donkey Kong isn't on PlayStation 3.
*EMBRACE YOUR INNER WEEABOO!!! :D
*My YouTube: http://youtube.com/PineappleProducer

Re: Create Helper on each Individual Hit in an Attack
#2  December 11, 2014, 05:35:34 pm
  • ****
  • Hey.
    • Ukraine
    • mugencoder.com

  • Online
You want to use projhit instead. This works a bit differently as you have to specify the ID of the projectile after the trigger. For example, if your projectile has an ID of 45, then your trigger should look like "projhit45."

For more info, you can refer to the documentation entry: http://elecbyte.com/mugendocs/trigger.html#projhit

-[Все слова это только слова.]-
Re: Create Helper on each Individual Hit in an Attack
#3  December 11, 2014, 05:58:55 pm
  • ***
  • My username has a history to it.
    • USA
    • pineappleproducer.webs.com/
Well, now it's not creating the helper at all. The projectile itself is a helper, but its using a HitDef controller. Do I need to alter it to be a Projectile controller?
*I have an uncle who can't grasp why Donkey Kong isn't on PlayStation 3.
*EMBRACE YOUR INNER WEEABOO!!! :D
*My YouTube: http://youtube.com/PineappleProducer

Re: Create Helper on each Individual Hit in an Attack
#4  December 11, 2014, 06:29:40 pm
  • ****
  • Hey.
    • Ukraine
    • mugencoder.com

  • Online
Oh, since you were saying projectile, I thought your projectile was a Projectile while your particles were helpers. So, your projectile is a helper as well? You don't need to change it. In that case, from the root, you'd have to detect using movehit yes, but make sure you redirect to your helper like so: helper(ID),movehit.

-[Все слова это только слова.]-
Re: Create Helper on each Individual Hit in an Attack
#5  December 11, 2014, 08:27:02 pm
  • ***
  • My username has a history to it.
    • USA
    • pineappleproducer.webs.com/
It worked! Thank you so much!!! ^_^
*I have an uncle who can't grasp why Donkey Kong isn't on PlayStation 3.
*EMBRACE YOUR INNER WEEABOO!!! :D
*My YouTube: http://youtube.com/PineappleProducer

Re: Create Helper on each Individual Hit in an Attack
#6  December 11, 2014, 08:56:22 pm
  • ****
  • Hey.
    • Ukraine
    • mugencoder.com

  • Online

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