YesNoOk
avatar

How to launch a projectile that explodes on impact or after travelling 200x? (Read 419 times)

Started by Mimikyutest77, October 03, 2019, 01:54:57 am
Share this topic:
How to launch a projectile that explodes on impact or after travelling 200x?
#1  October 03, 2019, 01:54:57 am
  • avatar
  • **
    • UK
How do I launch a projectile that explodes on impact with the foe or at a predetermined point 200X away if the foe isn't close enough, within 200 x points?
Re: How to launch a projectile that explodes on impact or after travelling 200x?
#2  October 03, 2019, 08:07:11 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Use a helper. Projectile works too but helper will make more sense if its like a timed bomb.

For the if it hits all you need is the movecontact trigger. For the other bit is that an absolute distance or a variable one like 200px away from the player? Both can be done but the method varies and 1 is far simpler than the other


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.
Re: How to launch a projectile that explodes on impact or after travelling 200x?
#3  October 04, 2019, 11:41:31 am
  • avatar
  • **
    • UK
I want to launch a projectile that will travel 200 X horizontal distance forward and then explode, regardless of whether the user moves after using it or not.
Re: How to launch a projectile that explodes on impact or after travelling 200x?
#4  October 04, 2019, 11:46:44 am
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
use a helper, and then calculate the pixel movement based on time and velocity. For example, if the velocity is X=2, then it means it will move 2 pixels per tick, therefore you will have to blow it up when time=100
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: How to launch a projectile that explodes on impact or after travelling 200x?
#5  October 09, 2019, 11:34:41 pm
  • avatar
  • **
    • UK
I'm sorry, I've never used Helpers before. How do they work? I doubleclicked Helper in Fighter Factory and filled out what showed up but that I think doesn't spawn the helper. And where do I put the "go from state 241 to 242 after 4 seconds, Helper!" Code?
Re: How to launch a projectile that explodes on impact or after travelling 200x?
#6  October 12, 2019, 02:32:35 am
  • avatar
  • **
    • UK
Where is your favorite documentation on how to code helpers? If you tell me I'll credit you in the character's readme file.

quote author=XGargoyle link=topic=187995.msg2456326#msg2456326 date=1570182404]
use a helper, and then calculate the pixel movement based on time and velocity. For example, if the velocity is X=2, then it means it will move 2 pixels per tick, therefore you will have to blow it up when time=100
[/quote]

Will this method also make the helper explode on contact with the enemy if the enemy is within 200x of the player? That's what I need here: projectile 1 firing, travelling 200x distance, then exploding. Or touching the foe if he's too close, then exploding early.