OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Agent Fire on 31 May 2005, 19:45:07
-
I am using HAWK's C130 v1.3 for a parachute jump, (OFPR_Addon_Hawk_C130_v1_3.zip), but all that was in the zip was a pbo. Can anyone tell me what different script commands there are for the plane? E.g. opening the cargo doors.
Thanks
-
have a go at un,pboeing the script and have a look at the script part it will have all the scripts of all the actions,
or another way download it from a different site it might have a readme oe something with
-
Cheers for the quick reply, i'll try that.
-
Nice, i found 28 .sqs files :P
Ok, OPENRAMP.sqs is the one - the question is, how do i implement this?
The file says:
_vehicle = _this select 0
? (_vehicle animationphase "rampa" > 0.5) :exit
? (speed _vehicle> 15):_vehicle say "rampasndc130";_vehicle animate ["rampa",0.7];_vehicle animate ["rampa1",1];exit
_vehicle say "rampasndc130"
_vehicle animate ["rampa",1]
_vehicle animate ["rampa1",1]
? !(isengineon _vehicle):_vehicle animate ["door1",1];_vehicle animate ["door2",1];_vehicle animate ["door3",1];
exit
Unfortunately i'm stupid :P so I just quickly tried
this exec "OPENRAMP.sqs"
in the plane's init field, which of course gave an error:
Type Object, expected Array
Can someone explain this to me? How do i cause the cargo doors to open at a waypoint or in the unit's init field when the mission starts?
-
Aha, i just downloaded an older version, and found a text file:
There are some lines from cpp file to help in using commands and scripts other example is in added mission
-------------------------------------------------------------------------------
class Animations
{
class backgear0
{
type="rotation";
animPeriod=6;
selection="backgear0";
axis="osbackgear0";
angle0=0
angle1=0.872;
};
class backgear1
{
type="rotation";
animPeriod=6;
selection="backgear1";
axis="osbackgear1";
angle0=0
angle1=0.872;
};
class leftkl
{
type="rotation";
animPeriod=2;
selection="leftkl";
axis="osleftkl";
angle0=0
angle1=-0.523;
};
class leftkl1
{
type="rotation";
animPeriod=1.2;
selection="leftkl1";
axis="osleftkl1";
angle0=0
angle1=3.14;
};
class rightkl
{
type="rotation";
animPeriod=2;
selection="rightkl";
axis="osrightkl";
angle0=0
angle1=0.523;
};
class rightkl1
{
type="rotation";
animPeriod=1.2;
selection="rightkl1";
axis="osrightkl1";
angle0=0
angle1=-3.14;
};
class frontkl
{
type="rotation";
animPeriod=2;
selection="frontkl";
axis="osfrontkl";
angle0=0
angle1=0.195;
};
class NoseGear
{
type="rotation";
animPeriod=6;
selection="front_gear";
axis="os front_gear";
angle0=0
angle1=1.6;
};
class rampa
{
type="rotation";
animPeriod=6;
selection="rampa";
axis="osrampa";
angle0=0;
angle1=0.66;
};
class rampa1
{
type="rotation";
animPeriod=5;
selection="rampa1";
axis="osrampa1";
angle0=0;
angle1=0.523;
};
class door1
{
type="rotation";
animPeriod=4;
selection="door1";
axis="osdoor1";
angle0=0;
angle1=-2.4;
};
class door2
{
type="rotation";
animPeriod=3;
selection="door2";
axis="osdoor2";
angle0=0;
angle1=-3;
};
class door3
{
type="rotation";
animPeriod=3;
selection="door3";
axis="osdoor3";
angle0=0;
angle1=3;
};
class trotle1
{
type="rotation";
animPeriod=2;
selection="trotle1";
axis="ostrotle";
angle0=0;
angle1=1.918;
};
class trotle2
{
type="rotation";
animPeriod=2;
selection="trotle2";
axis="ostrotle";
angle0=0;
angle1=1.918;
};
class trotle3
{
type="rotation";
animPeriod=2;
selection="trotle3";
axis="ostrotle";
angle0=0;
angle1=1.918;
};
class trotle4
{
type="rotation";
animPeriod=2;
selection="trotle4";
axis="ostrotle";
angle0=0;
angle1=1.918;
};
class reverseprops
{
type="rotation";
animPeriod=1;
selection="reverseprops";
axis="ostrotle";
angle0=0;
angle1=1.7;
};
class gasolinerope0
{
type="rotation";
animPeriod=15;
selection="gasolinerope0";
axis="osgasolinerope";
angle0=0
angle1=0.35;
};
class gasolinerope1
{
type="rotation";
animPeriod=15;
selection="gasolinerope1";
axis="osgasolinerope";
angle0=0
angle1=0.35;
};
class gasolinerope2
{
type="rotation";
animPeriod=15;
selection="gasolinerope2";
axis="osgasolinerope";
angle0=0
angle1=0.35;
};
class gasolinerope3
{
type="rotation";
animPeriod=15;
selection="gasolinerope3";
axis="osgasolinerope";
angle0=0
angle1=0.35;
};
class gasolinerope4
{
type="rotation";
animPeriod=15;
selection="gasolinerope4";
axis="osgasolinerope";
angle0=0
angle1=0.35;
};
class gasolinerope5
{
type="rotation";
animPeriod=15;
selection="gasolinerope5";
axis="osgasolinerope";
angle0=0
angle1=0.35;
};
class gasolinerope6
{
type="rotation";
animPeriod=15;
selection="gasolinerope6";
axis="osgasolinerope";
angle0=0
angle1=0.35;
};
class gasolinerope7
{
type="rotation";
animPeriod=15;
selection="gasolinerope7";
axis="osgasolinerope";
angle0=0
angle1=0.35;
};
class gasolinerope8
{
type="rotation";
animPeriod=15;
selection="gasolinerope8";
axis="osgasolinerope";
angle0=0
angle1=0.35;
};
class gasolinerope9
{
type="rotation";
animPeriod=15;
selection="gasolinerope9";
axis="osgasolinerope";
angle0=0
angle1=0.35;
};
class gasolinerope10
{
type="rotation";
animPeriod=15;
selection="gasolinerope10";
axis="osgasolinerope";
angle0=0
angle1=0.35;
};
class gasolinerope11
{
type="rotation";
animPeriod=15;
selection="gasolinerope11";
axis="osgasolinerope";
angle0=0
angle1=0.35;
};
class cargoload
{
type="rotation";
animPeriod=0.01;
selection="something";
axis="osrampa";
angle0=0
angle1=1;
};
class relase
{
type="rotation";
animPeriod=0.01;
selection="relase";
axis="osrampa";
angle0=0
angle1=1;
};
class fuellight
{
type="rotation";
animPeriod=0.05;
selection="fuellight";
axis="osfuellight";
angle0=0
angle1=3.14;
};
class ramplight
{
type="rotation";
animPeriod=0.05;
selection="ramplight";
axis="osramplight";
angle0=0
angle1=3.14;
};
class warninglightl
{
type="rotation";
animPeriod=0.05;
selection="warninglightl";
axis="oswarninglightl";
angle0=0
angle1=3.14;
};
class warninglightr
{
type="rotation";
animPeriod=0.05;
selection="warninglightr";
axis="oswarninglightr";
angle0=0
angle1=3.14;
};
class stall
{
type="rotation";
animPeriod=0.05;
selection="stall";
axis="osstall";
angle0=0
angle1=3.14;
};
class hight
{
type="rotation";
animPeriod=0.05;
selection="hight";
axis="oshight";
angle0=0
angle1=3.14;
};
};
class UserActions
{
class reverseprops
{
displayName="reverse props";
position="ostrotle";
radius=2;
condition="(isengineon this) and (speed this < 250) and (this animationPhase ""reverseprops"" == 0)";
statement="this animate[""reverseprops"",1];[this] exec {\HWK_c130\script\reverseprops.sqs}";
};
class unreverseprops
{
displayName="unreverse props";
position="ostrotle";
radius=2;
condition="(this animationPhase ""reverseprops"" > 0)";
statement="this animate[""reverseprops"",0]";
};
class Opendoor1
{
displayName="Open door 1";
position="osdoor1";
radius=3;
condition="(speed this < 15) and (this animationPhase ""door1"" < 0.5)";
statement="this animate[""door1"",1]";
};
class Closedoor1
{
displayName="Close door 1";
position="osdoor1";
radius=3;
condition="this animationPhase ""door1"" >= 0.5";
statement="this animate[""door1"",0]";
};
class Opendoor2
{
displayName="Open door 2";
position="osdoor2";
radius=3;
condition="this animationPhase ""door2"" < 0.5";
statement="this animate[""door2"",1]";
};
class Closedoor2
{
displayName="Close door 2";
position="osdoor2";
radius=3;
condition="this animationPhase ""door2"" >= 0.5";
statement="this animate[""door2"",0]";
};
class Opendoor3
{
displayName="Open door 3";
position="osdoor3";
radius=3;
condition="this animationPhase ""door3"" < 0.5";
statement="this animate[""door3"",1]";
};
class Closedoor3
{
displayName="Close door 3";
position="osdoor3";
radius=3;
condition="this animationPhase ""door3"" >= 0.5";
statement="this animate[""door3"",0]";
};
class Opensrampa
{
displayName="Open cargo ramp";
position="osrampa";
radius=16;
condition="this animationPhase ""rampa"" < 0.5";
statement="[this] exec {\HWK_c130\script\openramp.sqs}";
};
class Closerampa
{
displayName="Close cargo ramp";
position="osrampa";
radius=16;
condition="this animationPhase ""rampa"" >= 0.5";
statement="[this] exec {\HWK_c130\script\closeramp.sqs}";
};
class parasoldiers
{
displayName="Soldiers Bail out";
position="osrampa";
radius=16;
condition="((count crew this)>3) and (speed this > 15) and (isengineon this)";
statement="[this] exec {\HWK_c130\script\parasoldiers.sqs}";
};
class paracargo
{
displayName = "Parachute cargo";
position="osrampa";
radius=16;
condition = "this animationPhase ""cargoload"" > 0";
statement = "this animate [""relase"",1]";
};
class loadcargo
{
displayName = "load cargo";
position="posvehicle";
radius=4;
condition = "((vehicle player != player) and (speed vehicle this < 5) and (this animationPhase ""cargoload"" < 1))";
statement = "[this,player] exec {\HWK_c130\script\cargoload.sqs}";
};
class opengasolinerope
{
displayName = "Deploy fuel hose";
position="ostrotle";
radius=2;
condition = "((speed this > 15) and (isengineon this) and (this animationPhase ""gasolinerope0"" < 0.5))";
statement = "[this] exec {\HWK_c130\script\opengas.sqs}";
};
class closegasolinerope
{
displayName = "Retract fuel hose";
position="ostrotle";
radius=2;
condition = "((speed this > 15) and (isengineon this) and (this animationPhase ""gasolinerope0"" > 0.5))";
statement = "[this] exec {\HWK_c130\script\closegas.sqs}";
};
class Tankair
{
displayName = "Refuel in C-130";
position="gasolinerope0";
radius=200;
condition = "((player distance this < 200) and (vehicle player != vehicle this) and (vehicle player != player) and (isengineon this) and ((this getpos select 2) > 20))";
statement = "[this,player] exec {refuel.sqs}";
};
};
Ok so, what do i need to put in the init field to have the cargo door open? I tried
this animate[""door3"",1]
- didn't work, gave an error. Tried it with only one pair of "s, still didn't work.
-
Aha, found it ;D
[this] exec {\HWK_c130\script\openramp.sqs}
-
also wouldnt the animate command work like this
hawk animate ["closeramp","0"]
im not sure if thats the right syntax but you get my idea