Jump to content

getting the distance between an NPC and an explosion's impact point


Bunslinger

Recommended Posts

so basically what i'm trying to do is i'm trying to find out if an NPC is in a certain range of an explosion's impact point. simply using GetDistance3D doesn't quite work because it considers the explosion AND the radius to be one thing, so it's basically asking "how far from the entire effective radius of the explosive is the npc", so when they're outside of said radius the effect doesn't apply at all since they're not considered "in" the explosion.

 

here's what I have so far:

If GetDead == 1 && GetDistance3D (explosion point minus explosion radius + 128)
	DismemberLimb 0 1
EndIf
          

so basically I'm trying to find out if the NPC is 128 game units away from the point of impact, not from the entire effective radius of the explosion. how would that be written?

 

Link to comment
Share on other sites

  • 1 month later...

Without checking,

 

Your saying that GetDistance3d returns the distance from the outer edge of the explosion but you want to know what the distance is from the point of impact + 128.

 

if you used GetDistance3d, then added GetExplosionRefRadius, this should give you the point of impact.

 

So... say (Distance = 300 units) + (radius = 50) == point of impact, - 128 units = DANGERZONE.

 

Yes ?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...