How can I make a land-mine (that explodes when a pawn/vehicle enters a given radius)? I'll check soon the SpectralTandem Proximity Grenade and see if it helps...
Announcement
Collapse
No announcement yet.
How to make land-mines?
Collapse
X
-
What exactly is the problem you're having? If it's detecting when a pawn enters the detection radius and damaging it and any other actors within the blast radius (which could easily be two different values, and IMO should be) then you can use the VisibleCollidingActors iterator to locate and damage any actors within the blast radius, and call it within the landmine's Touch event. Cylinder collision can be used to simplify the process by setting CollisionRadius to an appropriate value and setting the landmine's bUseCylinderCollision property to True. The engine will invoke the actor's Touch event when an actor enters this radius, and within the Touch event you can assess whether or not to detonate the mine and use VisibleCollidingActors (one of the fastest iterators available, so speed won't be too much of an issue) to locate and damage all actors within the blast radius. Or use a seperate actor which handles the explosion stuff. (Otherwise you'll need to use Touch to spawn an emitter or appropriate visual effects to represent the mine's detonation.)
If it's something else though, then you'll need to provide more information.
Comment