Giving units the ability to call in Airstrikes/Paratroopers/Magnyfying glass
Posted: Sat Mar 11, 2017 10:28 pm
I had too much fun with this one.
Again, another idea I got from Company of heroes, I was trying to give infantry the ability to build barricades, but just as i test I used the bombing run first.
So, to do this you have to go into the config file of the bombing run obj.army.bombingrun
go to the entry that says "unit constructor" and change it from the radio operator to sarge
Constructor("army.unit.sarge");
then go to sarges config and add this underneath the create unit entry
GameObj()
{
ThinkInterval(1);
IdleTask("Tasks::UnitConstructor");
Properties()
{
it should look like this
// UNIT
CreateObjectType("army.unit.sarge", "Unit")
{
GameObj()
{
ThinkInterval(1);
IdleTask("Tasks::UnitConstructor");
Properties()
{
if you add this to the "Add" section then sarges icon will appear always next to the bulldozer.
Add("Client::FacilityBar");
I tried to give sarge the ability to build units, but when I try to build the unit i get an error that says memory access violation. So I will have to do some more poking around before Sarge can start magically poofing grunts! But, it's a start
Again, another idea I got from Company of heroes, I was trying to give infantry the ability to build barricades, but just as i test I used the bombing run first.
So, to do this you have to go into the config file of the bombing run obj.army.bombingrun
go to the entry that says "unit constructor" and change it from the radio operator to sarge
Constructor("army.unit.sarge");
then go to sarges config and add this underneath the create unit entry
GameObj()
{
ThinkInterval(1);
IdleTask("Tasks::UnitConstructor");
Properties()
{
it should look like this
// UNIT
CreateObjectType("army.unit.sarge", "Unit")
{
GameObj()
{
ThinkInterval(1);
IdleTask("Tasks::UnitConstructor");
Properties()
{
if you add this to the "Add" section then sarges icon will appear always next to the bulldozer.
Add("Client::FacilityBar");
I tried to give sarge the ability to build units, but when I try to build the unit i get an error that says memory access violation. So I will have to do some more poking around before Sarge can start magically poofing grunts! But, it's a start