Simon C
Aug 26 2009, 15:52
Hi all.
I've downloaded rjtwins' AC130 pack, and I'm trying to create a script to automate the process. I've managed to create a copy of the C130 with the display name 'AC-130' that shows up in the editor and can be placed. Here is my config.cpp:
//AC-130 Config
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7
#define true 1
#define false 0
class CfgPatches {
class sc_ac130 {
units[] = { "sc_ac130" };
weapons[] = {};
};
};
class DefaultEventhandlers;
class CfgVehicles {
class AllVehicles; // External class reference
class Air : AllVehicles {};
class Plane : Air {};
class C130J : Plane {};
class sc_ac130 : C130J {
displayName = "AC-130";
class EventHandlers : DefaultEventhandlers
{
Init = "_this exec ""\ac130\init.sqs""";
};
};
};
And here is init.sqs
_spooky = _this select 0
_gau12 = 'GAU_12U_Equalizer' createVehicle [0,0,100]
_bofors = 'L60_Bofors_cannon' createVehicle [0,0,200]
_howitzer = 'M102_cannon' createVehicle [0,0,300]
_gau12 attachto [_spooky,[0,-3,-7]]
_bofors attachto [_spooky,[0,1.5,-7]]
_howitzer attachto [_spooky,[0,6,-7]]
So far, the AC-130 is created, but there are no guns attached to it. I'm assuming that the script is either not running or is broken. Anyone know how to get this working?
Thanks in advance. :)
I've downloaded rjtwins' AC130 pack, and I'm trying to create a script to automate the process. I've managed to create a copy of the C130 with the display name 'AC-130' that shows up in the editor and can be placed. Here is my config.cpp:
//AC-130 Config
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7
#define true 1
#define false 0
class CfgPatches {
class sc_ac130 {
units[] = { "sc_ac130" };
weapons[] = {};
};
};
class DefaultEventhandlers;
class CfgVehicles {
class AllVehicles; // External class reference
class Air : AllVehicles {};
class Plane : Air {};
class C130J : Plane {};
class sc_ac130 : C130J {
displayName = "AC-130";
class EventHandlers : DefaultEventhandlers
{
Init = "_this exec ""\ac130\init.sqs""";
};
};
};
And here is init.sqs
_spooky = _this select 0
_gau12 = 'GAU_12U_Equalizer' createVehicle [0,0,100]
_bofors = 'L60_Bofors_cannon' createVehicle [0,0,200]
_howitzer = 'M102_cannon' createVehicle [0,0,300]
_gau12 attachto [_spooky,[0,-3,-7]]
_bofors attachto [_spooky,[0,1.5,-7]]
_howitzer attachto [_spooky,[0,6,-7]]
So far, the AC-130 is created, but there are no guns attached to it. I'm assuming that the script is either not running or is broken. Anyone know how to get this working?
Thanks in advance. :)