YesNoOk
avatar

How To Make Projectiles That Stay On The Ground?  (Read 6921 times)

Started by Ki$@1st456v, January 13, 2021, 06:15:05 pm
Share this topic:
How To Make Projectiles That Stay On The Ground?
#1  January 13, 2021, 06:15:05 pm
  • avatar
  • **
    • USA
Hi, again everyone! I wanted to ask about another thing. Do you remember Trish's Trick Hopscotch from UMVC3/MVC3? I remembered that no matter how high she was off the ground, whenever she did the move, the trap would appear right next to her at ground level. I was wondering, how do you code a move to do that and what numbers do you put in the x and y values to do that? I still want the projectile to travel horizontally, but I am not sure how to code it where it begins at ground level right next to my character regardless of my character's height or altitude in the air. Is it a command such as postype= p1dist? Also, does it have to be from a helper state, projectile state, etc.? Thank you all for your help with my previous question and I am grateful for your assistance!
Re: How To Make Projectiles That Stay On The Ground?
#2  January 15, 2021, 08:26:15 pm
  • avatar
  • **
    • USA
offset y value in projectile sctril should be: -pos y or ceil(-pos y)
Re: How To Make Projectiles That Stay On The Ground?
#3  January 16, 2021, 12:19:33 pm
  • avatar
  • **
    • USA
Will that keep the projectiles at ground level however while you are in the air though? I know that the offset changes where the projectile appears in accordance to my character's position, but is there a value to ascribe a permanent position at ground level for the projectile?
Re: How To Make Projectiles That Stay On The Ground?
#4  January 19, 2021, 10:50:59 am
  • avatar
  • **
    • USA
Just make it a helper projectile and have the helper move itself to the ground as its first SCTRL.

If you're making a projectile that can be fired in the air, but spawns on the ground, there's like a 99% chance that you're going to need it to do SOMETHING that a mugen projectile can't normally do.  Just save yourself the grief.
Re: How To Make Projectiles That Stay On The Ground?
#5  January 19, 2021, 03:24:04 pm
  • avatar
  • **
    • USA
Okay, as an example, would it be like this when I code it?

[State 0, Helper]
type = Helper
triggerall = numhelper(1000)=0
trigger1 = AnimElem = 9
helpertype = normal ;player
name = "Plasma Beam"
ID = 1000
stateno = 1010
pos = floor(56*const(size.xscale)),floor(-78*const(size.yscale))
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1