Page 1 of 1

Script 4U: a cool parametric minefield

Posted: Fri Aug 01, 2003 3:52 pm
by Valoche
Hello, world.

Here is my first real contribution to the mapping comunity. I hope nobody came out with this thing before...

I create a global script, you can download it here:
valoche_magic.pk3

I copy/pasted the header of the global script included in the pk3, here it goes... It's self explanatory.

Let me know if you like it.

Valoche :wink:

// 1- MINEFIELD v1.0
// =================
// A new sort of minefields. The minefield can be walked through
// provided you avoid the mines, defuse them, or make them blow up
// with a grenade or a bazooka.
//
// Features:
// ---------
// a) Walk on mine: you hear a "click", and it blows up 0.5 seconds later,
// doing the following damage:
// - 50 within 4.8 meters (250 world units)
// - 20 between 4.8 and 6.7 meters (250 and 350 world units)
// - 5 between 6.7 and 8.5 meters (350 and 450 units)
// b) Send a grenade or shoot with a bazooka: all the mines affected by the
// explosion blow up.
// c) You can defuse a mine by getting close to it and pressing the "use" key/button.
// It takes 2 seconds to defuse a mine. You'll get a neat defuse sound, and a little
// smoke effect.
//
// To create a minefield, follow this tutorial:
// --------------------------------------------
// a) Create a brush, convert it to a script_object (RCLICK/script/object)
// b) Give it a targetname, for example: $targetname / minefield1
// c) Give it the following keys:
// - #x / X size as displayed in MOHradiant (press SHITF+Q if you don't see it)
// - #y / Y size as displayed in MOHradiant (press SHITF+Q if you don't see it)
// - #z / Z size as displayed in MOHradiant (press SHITF+Q if you don't see it)
//
// d) In the map's script file, add the following line:
// <script_object> thread global/valoche_magic.scr::mines_setup <# mines>
// For our example, it could be:
// $minefield1 thread global/valoche_magic.scr::mines_setup 70
// That would spread 70 mines on top of the brush $minefield1.

Posted: Fri Aug 01, 2003 3:57 pm
by Serph
interesting... that could be usefull for some projects i have thx!

Posted: Fri Aug 01, 2003 8:48 pm
by Alcoholic
thats cool man.

d('-'d)

Posted: Sat Aug 02, 2003 7:47 am
by Bilko
That sounds cool, might have to give a try :wink:

Bilko.

Works good

Posted: Sat Aug 02, 2003 1:10 pm
by tltrude
Very nice! It works great for flat places. I think the health damage from standing on a mine should be changed to 100 or more. I stood on one and only lost 50% health. You need to get someone to make a new model for the mines. Although, the bottle tops do look ok.

Posted: Sat Aug 02, 2003 3:48 pm
by Valoche
Yeah, I wondered of much damage I would put in here... :twisted:

But you're right, I'll just pour 100 damage for the 1st meter, then maybe decrease the damage by 20 every other meter ?

I think I'm gonna try to do the model myself, in fact I just need a cube that is 2x2x2 units big. I do think I'm able to torture MilkShape long enough to get a small cube. I do. I really do :lol: :lol: :lol:

Valoche