Data Realms Fan Forums http://45.55.195.193/ |
|
Proximity Mines http://45.55.195.193/viewtopic.php?f=73&t=15395 |
Page 1 of 1 |
Author: | Gotcha! [ Tue Jun 16, 2009 9:28 pm ] |
Post subject: | Proximity Mines |
Hi people, Could someone help me out by making a lua script which makes TDExplosives go off when someone is nearby? I've been trying to modify the homing missile script, but... |
Author: | numgun [ Tue Jun 16, 2009 9:32 pm ] |
Post subject: | Re: Proximity Mines |
If you have my BW mod, check out the proximity mine. Its exactly what you're looking for I think. You can find all the needed stuff in BW.rte/Grenades |
Author: | mail2345 [ Tue Jun 16, 2009 9:35 pm ] |
Post subject: | Re: Proximity Mines |
Wouldn't a radius area detection work better? |
Author: | Mind [ Tue Jun 16, 2009 9:36 pm ] |
Post subject: | Re: Proximity Mines |
Well just a quick script: Code: function Update(self) for actor in MovableMan.Actors do local avgx = actor.Pos.X - self.Pos.X; local avgy = actor.Pos.Y - self.Pos.Y; local dist = math.sqrt(avgx ^ 2 + avgy ^ 2); if dist < 250 then self:GibThis() end end end |
Author: | Gotcha! [ Tue Jun 16, 2009 9:45 pm ] |
Post subject: | Re: Proximity Mines |
Thanks, all. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |