Alliedassault

Alliedassault (alliedassault.us/index.php)
-   MoH Maps, Mods & Skins (alliedassault.us/forumdisplay.php?f=11)
-   -   scripting help? (alliedassault.us/showthread.php?t=29500)

bluebrooks 08-27-2003 10:07 AM

okay, but what was the problem?
did the whole script bomb out? (you would know if this happend because the sound wouldn't work)
did you look in the console to see what it said the problem was?

Dragonwraith 08-27-2003 10:13 AM

nothing happened

bluebrooks 08-27-2003 10:17 AM

something had to happen. it may not have worked, but then at least the console would have reported errors.

if you want, email me your script if you can't get it working. i could take a look at it

Dragonwraith 08-27-2003 10:19 AM

before we get into this anymore will the exposions kill players?? that's what i really want them to do

bluebrooks 08-27-2003 10:24 AM

it will the same as a mine exploding, so yes it will.

Dragonwraith 08-27-2003 10:30 AM

sent you the .scr

bluebrooks 08-27-2003 11:28 AM

i just emailed back the script. let me know how you make out

bluebrooks 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

Dragonwraith 08-28-2003 12:48 PM

thanx... again i'll give it a run and let you know how it turns out

bluebrooks 08-28-2003 12:52 PM

if you didn't get my email yet, i sent you your script back updated with all 4 mines and this scripting code

Dragonwraith 08-28-2003 12:59 PM

they work!! woo hoo. I only see 3 of the 4 going off though, i'll check to see whick set of coords it is and see if i can spot the prob. I'll let ya know. Thanx again for the hlep bro

bluebrooks 08-28-2003 01:08 PM

tip about coordinates:
if you are pretty sure your coordinates are correct but the spawns aren't working, try adding about 20 to the Z value.

usually when you get coordinates, you get them through the console from your own position. but the system takes them from your feet. so the system may be spawning your stuff right at ground level or a little below (especially if you were standing on unlevel ground when you got your coordinates).

so, how do the mines look?
oh note....you can change the radius of the mine. in the script, the value of 300 is used now (the one which measures vector length). you can change that.

Dragonwraith 08-28-2003 01:27 PM

they look great, i knew the coord were foot level. I'll poke around a bit. so if i made the 300 higher it's a bigger blast right?

bluebrooks 08-28-2003 01:39 PM

yup

chipsdw 08-28-2003 03:22 PM

could u post the script bluebrooks? it would be much appreciated.


All times are GMT -6. The time now is 04:36 AM.

Powered by vBulletin® Version 3.8.12 by ScriptzBin
Copyright ©2000 - 2025, vBulletin Solutions Inc.
© 1998 - 2007 by Rudedog Productions | All trademarks used are properties of their respective owners. All rights reserved.