OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 4th Dimension on 16 Dec 2004, 19:08:56
-
I need a way to change unit specs easily for a mission I am making that basicly involves your civilian chopper going down in the middle of a jungle and being hunted by a superhuman. It is heavily inspired by Operation Firelord and the flim Predator. I need to make the superhuman a lot stronger than your average soldier and to have a weapon that fires faster and more accurately. I also wish him to be able to sprint for a long time. I have looked through all the scripts in the Editors Depot but cannot find any.
-
you could change the units skill level to full and have everyone elses lower
-
I want to change specif unit specs. Most units will have maximum skill level, otherwise the superhuman wil take them down to easily. I would also like to make the death of the superhuman scripted, and to hide and only kill when units get to close. I am new to scripting, so I could use some help.
-
There are some enhanced AI scripts in the Ed Depot that might help.
-
Here is a section from the config.cpp of a terminator addon; shows how to create a super-strong soldier. Full credit to the author.
//
// SKYNET T-800 :: VERSION 1.30
// M27-Plasma Riffle :: VERSION 1.30
//
// - - made by Black Baron (blackbaron@chello.at) c March. 2002
//
class CfgVehicles
{
class All{};
class AllVehicles : All{};
class Land : AllVehicles{};
class Man : Land{};
class Soldier : Man{};
class SoldierWB : Soldier{};
class T800 : SoldierWB{
armor=60;
armorStructural=17.500000;
armorHead=14.700000;
armorBody=14.800000;
armorHands=18.500000;
armorLegs=18.500000;
cost=1600000;
canHideBodies=1;
canFloat=1;
side=1;
type=2;
scope=2;
minGunElev=-300;
maxGunElev=300;
minGunTurn=-20;
maxGunTurn=20;
irTarget=0;
lasertarget=0;
airTarget=0;
irLock=0;
airLock=0;
laserLock=0;
irscanner=1;
irScanRange = 5000;
irScanGround = 1;
laserScanner=1;
midspeed=180
maxspeed=180
unitInfoType="UNITINFOAIRPLANE";
displayName="T-800 (M27)";
model="\T800\T800";
weapons[]={StrokeGun,Throw,Put,M27Plasma,NVGoggles,};
magazines[]={StrokeGun,M27Grenade,M27Grenade,M27Grenade,M27,M27,M27,M27};
};
};
The relevant bits pertainingt to strength are:
armor=60;
armorStructural=17.500000;
armorHead=14.700000;
armorBody=14.800000;
armorHands=18.500000;
armorLegs=18.500000;
I'm not too sure what 'cost' and one or two other things mean, but there are some tutes in the addons depot that will explain all this.