Thread: scripting help?
View Single Post
Old
  (#23)
bluebrooks is Offline
Senior Member
 
Posts: 156
Join Date: Jun 2002
   
Default 08-28-2003, 08:06 AM

this script will work. i tested it. it may be too complicated, and i think emitters work much easier, but anyway here it is.
(you just put this thread in your map script. then add a line "thread randommine1" to the main section of the script. you can add as many of these as you like by incrementing the variable numbers and changing the coordinates. i.e. randommine# and $mine#)

randommine1:
local.waitformine = (randomint(45) + 10)
wait local.waitformine
spawn animate/fx_explosion_mine "targetname" "mine1"
$mine1.origin = ( -981 -2998 -63)
$mine1 anim start
if ($player == NULL)
local.dudes=0
else
local.dudes = $player.size
if (local.dudes > 0)
local.dude = exec global/makearray.scr $player
for (local.i=1;local.i<local.dudes+1;local.i++)
{
if (vector_length ($mine1.origin - local.dude[local.i].origin) < 300)
local.dude[local.i] exec global/bullethit.scr (0 -1 0) 800 50 1
}
wait 4
$mine1 remove
goto randommine1
end
  
Reply With Quote