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

randommine1:
(this line names the thread
local.waitformine = (randomint(45) + 10)
(generates a random number between 10 and 55
wait local.waitformine
(delays the thread for x amount of seconds
spawn animate/fx_explosion_mine "targetname" "mine1"
(generates a mine explosion that hasn't yet blown up
$mine1.origin = ( -981 -2998 -63)
(puts the mine in a specific place on the map
$mine1 anim start
(blows up the mine
if ($player == NULL)
local.dudes=0
else
local.dudes = $player.size
(last 4 lines determine how many people are playing on the board
if (local.dudes > 0)
local.dude = exec global/makearray.scr $player
(last 2 lines create a listing of the people playing
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
}
(last 5 lines spin through all the people. if they close to the mine, it kills
(them
wait 4
(waits 4 seconds
$mine1 remove
(takes the old mine off the map
goto randommine1
(starts the thread all over again
end
(marks the end of the thread
  
Reply With Quote