SatchTFF
  • SatchTFF
  • 50.25% (Neutral)
  • Private Topic Starter
6 years ago
Hello, I wanted to have an Infantry in Shockwave Mod to behave like those of Wasp Hive in ROTR Mod. I've tried several methods like having the upgrades implemented in the Infantry via Map.ini and even resulting to copying the Behavior Module of the Wasp Hive in ROTR.

Here's what I have done so far:


;------------------------------------
;Create a new unit using Airborne Ranger
;------------------------------------
;Object Airf_AmericaInfantryAirborneRanger
;	AddModule ModuleTag_XX_Override
;		Behavior = GrantUpgradeCreate ModuleTag_XX
;			UpgradeToGrant = Upgrade_AmericaBattleDrone
;		End
;	End
;
;	Behavior = ObjectCreationUpgrade ModuleTag_08
;    	UpgradeObject = OCL_AmericanTechnicianDrones
;    	TriggeredBy   = Upgrade_AmericaBattleDrone
;  	End
;
;	Behavior = SpawnBehavior ModuleTag_Drones01
;    	SpawnNumber           = 3
;    	SpawnReplaceDelay     = 5000
;    	SpawnTemplateName     = AmericaVehicleBattleDrone
;    	ExitByBudding         = No
;    	InitialBurst          = 1
;    	OneShot               = No
;    	AggregateHealth       = No
;    	SlavesHaveFreeWill    = No
;    	SpawnedRequireSpawner = Yes
;  	End
;End

I commented them out since every time I tried opening the map with this code, the game crashes.

Are there any other ways to have an Infantry spawn drones overhead, like have 1 Battledrone, 1 Hellfire Drone and 1 Scout Drone tailing the Infantry? Or at the very least, have 3 Battledrones follow the Infantry?

Screenshot (149).png

Click to View Image18 View(s)

Sponsor
AdrianeMapMaker
6 years ago
are you creating this for a specific map only or a mod ?

A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




SatchTFF
  • SatchTFF
  • 50.25% (Neutral)
  • Private Topic Starter
6 years ago

are you creating this for a specific map only or a mod ?

Originally Posted by: adrianemapmaker 



It's for a Map.
UTD^Force
6 years ago
I've just checked what you want to do.
I did it for zero hour, so you will need to change some names to the ones from shockwave.
ObjectCreationList OCL_AmericanBattleDronePlusOP
  CreateObject
    Offset = X:0 Y:0 Z:10 
    ObjectNames = AmericaVehicleBattleDrone
    IgnorePrimaryObstacle = Yes
    Disposition = LIKE_EXISTING
    Count = 3
    RequiresLivePlayer = Yes
  End
End
;Make sure it is in this order, OCL then object or it will crash as the game reads the code line by line
Object AmericaInfantryRanger
 AddModule 
  Behavior = ObjectCreationUpgrade ModuleTag_90
    UpgradeObject = OCL_AmericanBattleDronePlusOP
    TriggeredBy   = Upgrade_AmericaBattleDrone
  End
 End
 AddModule 
  Behavior = GrantUpgradeCreate ModuleTag_89
    UpgradeToGrant = Upgrade_AmericaBattleDrone
  End
 End
End
You will need 'AddModule' and 'End' for each behaviour not just for one, that was causing the crash.
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs