And i need help with it @Berserk Cyborg
here's the conversion so far
Code: Select all
/* Set debug value (below) to 1 only if this script has problems needing to be fixed
*
* When active, player's power level will hover around a value reflecting
* the status of the script:
*
* 1000 -- no active mines on field
* 1200 -- active mines nearby
* 1300 -- player's VTOL flew over an active mine
* 7770 -- Minesweeper removed a mine just now
* 6660 -- KA-BOOM! Heh heh heh...
*
* 2000...2700 -- A certain type of mine didn't go off when stepped on
* 2800...3000 -- Unable to determine type of mine player stepped on,
* (usually an error encoding the health stat of mine)
*
*/
// ???
actRange INT 50
// ???
setRange INT 600
var Miner = "Cyb-Bod-MineSweep";
var Mine = "ContaMine";
var BuildMine = "ContaMine1";
var BuildMine = "ContaMine2";
var BuildMine = "ContaMine3";
var BuildMine = "ContaMine4";
var BuildMine = "ContaMine5";
var BuildMine = "ContaMine6";
var BuildMine = "ContaMine7";
var BuildMine = "ContaMine8";
var Fizzle = "ZNULLWEAPON";
var Blip = "ZNULLMINE";
var Explosion = "WepMine1";
var Explosion = "WepMine2";
var Explosion = "WepMine3";
var Explosion = "WepMine4";
var Explosion = "WepMine5";
var Explosion = "WepMine6";
var Explosion = "WepMine7";
var Explosion = "WepMine8";
and here's the landmines part of the .slo
Code: Select all
// Must do this to all players, for MP compatibility
player = 0;
while (player < 11)
{
initGetFeature(Mine, player, selectedPlayer);
testMine = getFeature(selectedPlayer);
while (testMine != NULLOBJECT)
{
// Retrieve type & player info from the mine
temp = testMine.health / 10;
tempp = testMine.health - 10 * temp;
// The player can see their own mines only.
if (tempp > 4)
{fireWeaponAtLoc(Blip, testMine.x, testMine.y);}
target = droidTargetInArea(player, player, (testMine.x - actRange), (testMine.y - actRange), (testMine.x + actRange), (testMine.y + actRange));
if (target != NULLOBJECT)
{
// Rule 1: Only ground units may detonate land mines.
// (Also note that the mine layer borg does not "trip" them ;) )
if ((target.z < testMine.z + 96) and (target.body != Miner[0]))
{
// Make sure only a mine can go boom.
if (temp < 8)
{
if (target.body == Miner[1])
{
// Mine Sweeper 'borg gets lucky!
fireWeaponAtObj(Fizzle, testMine);
}
else
{
// Anyone else, well... >B}
fireWeaponAtObj(Explosion[temp], target);
}
destroyFeature(testMine);
}
}
}
testMine = getFeature(selectedPlayer);
}
player = player + 1;
}
Code: Select all
// Static variables defined in the VLO
private FEATURESTAT Mine;
private STRUCTURESTAT BuildMine[8];
private WEAPON Explosion[8];
private WEAPON Fizzle, Blip;
private BODY Miner[2];
// Used for tweaking and debugging
private INT setRange, actRange;
// Temporary script variables
private INT player;
private INT count;
private INT temp, tempp;
private BOOL NotReady;
private STRUCTURE strucMine;
private FEATURE testMine;
private DROID target;
event CheckMines(every, 10)