Post: Built in MineFields
02-26-2011, 05:36 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Well it looks like they thought about using an idea they had with COD2. Minefields. Remember how you would walk out of a map and blow up, well I just found this.
    minefields()
{
minefields = getentarray("minefield", "targetname");
if (minefields.size > 0)
{
level._effect["mine_explosion"] = loadfx ("explosions/grenadeExp_dirt");
}

for(i = 0; i < minefields.size; i++)
{
minefields[i] thread minefield_think();
}
}

minefield_think()
{
while (1)
{
self waittill ("trigger",other);

if(isPlayer(other))
other thread minefield_kill(self);
}
}

minefield_kill(trigger)
{
if(isDefined(self.minefield))
return;

self.minefield = true;
self playsound ("minefield_click");

wait(.5);
wait(randomFloat(.5));

if(isdefined(self) && self istouching(trigger))
{
origin = self getorigin();
range = 300;
maxdamage = 2000;
mindamage = 50;

self playsound("explo_mine");
playfx(level._effect["mine_explosion"], origin);
radiusDamage(origin, range, maxdamage, mindamage);
}

self.minefield = undefined;
}
(adsbygoogle = window.adsbygoogle || []).push({});
02-26-2011, 06:58 AM #11
emsp
Space Ninja
Originally posted by Sn1PaXx View Post
how would u spawn them tho


1. like javirain (random)
2. with the killbarrier (but choose where)[/QUOTE]

so like thread minefield(303, 304, 34) <<<just made these up
02-26-2011, 07:02 AM #12
Originally posted by emsp View Post
1. like javirain (random)
2. with the killbarrier (but choose where)


so like thread minefield(303, 304, 34) <<<just made these up[/QUOTE]

well you would have to have a code for minefield

so basically you could just make the same code for building bunkers with ramps and such except change carepackage to like ac130_45mm_mp then choose if you get like in 5 feet of minefield(303, 304, 34) then it explodes
02-26-2011, 07:08 AM #13
emsp
Space Ninja
Originally posted by Sn1PaXx View Post
so like thread minefield(303, 304, 34) <<<just made these up


well you would have to have a code for minefield

so basically you could just make the same code for building bunkers with ramps and such except change carepackage to like ac130_45mm_mp then choose if you get like in 5 feet of minefield(303, 304, 34) then it explodes[/QUOTE]

im a new to this so yea i couldent get this working lol
02-26-2011, 07:11 AM #14
TheFallen
Former Dark Night
Originally posted by FourzerotwoFAILS View Post
I'm not making you read these threads am I? You wouldn't have looked had you not thought that it was interesting.


That is a good point. I'm just tired of seeing something that doesn't work. You might want to try to get them to work and then post them to see if anyone else can attempt it if they don't. Other wise post a release.
02-26-2011, 07:11 AM #15
Originally posted by emsp View Post
im a new to this so yea i couldent get this working lol


lol I was too at first, I still am . . . Just ask someone and im sure they will help
02-26-2011, 07:13 AM #16
emsp
Space Ninja
Originally posted by Sn1PaXx View Post
lol I was too at first, I still am . . . Just ask someone and im sure they will help


well i guess its gonna be Trial and error

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo