YesNoOk
avatar

Helper Projectile Collision (Read 155 times)

Started by felineki, October 29, 2012, 01:16:43 am
Share this topic:
Helper Projectile Collision
#1  October 29, 2012, 01:16:43 am
  • ****
Am in the progress of coding a helper projectile, and am trying to get it to collide with other projectiles like a projectile should. This is what I have so far:
Code:
[Statedef 2020]
type    = A
movetype= A
physics = N
ctrl = 0
sprpriority = 5
velset = 2.765265,1
anim = 2020

[State 1036, 6];Only Hit By Projectiles
type = HitBy
trigger1 = 1
value = SCA,AP

[State 1036, 6];Destroy Upon Collision with Projectile
type = HitOverride
trigger1 = 1
attr = SCA,AP
stateno = 2023

[State 1036, 6];Destroy Upon Contact With Opponent or Ground, or Leaving Screen
type = ChangeState
trigger1 = Vel Y + Pos Y > 0
trigger2 = FrontEdgeDist < -64
trigger3 = MoveContact = 1
value = 2023

[State 212, 1];HitDef
type = HitDef
trigger1 = 1
attr = A,SP
damage = 23, 0
animtype = Hard
air.animtype = Back
guardflag = M
hitflag = MAP
priority = 3, Hit
pausetime = 0, 15
sparkno = -1
guard.sparkno = -1
sparkxy = -10, -76
hitsound = S5, 2
guardsound = S6, 0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
yaccel = 0.28125
ground.velocity = -8
guard.velocity = -12.75
airguard.velocity = -2,-5.75
air.velocity = -2,-5.75
air.hittime = 9999
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
p2stateno = ifelse(P2StateType=S,15000, ifelse(P2StateType=C,15010,15020))
But two opposing instances of the projectile still pass through each other. What am I missing?
Re: Helper Projectile Collision
#2  October 29, 2012, 01:48:14 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You have p2stateno, it's overriding the hitoverride.

Use targetstate instead.


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: Helper Projectile Collision
#3  October 29, 2012, 01:56:02 am
  • ****
Ah, I see. I'll try that out. Thanks!