Posted: Thu Feb 26, 2009 8:44 pm Post subject:
Resource Gatherers and Turrets -COMPLETED
Subject description: Impossible?
I have been trying to give the war miner a turret recently, something I had neglected prior. However, it seems the Zero Hour doesn't quite like having it's resource gatherers having turrets.
I gave the War Miner the correct module to have it's turret (copied from another vehicle) and tested this ingame. The warminer's turret would spin, and it would aim where you force fire it, yet the war miner lost it's ability to move! Quite strange, I double checked my code to be sure that I didn't erase the locomotor or anything similiar, and I had not. So then I proceeded to look at the codes of other units. They had their turret modules right above the locomotor tag (I stuck my turret module at the bottom of the War Miner entry). So I copied the module again and stuck it right above the locomotor tag. I tested it ingame again, and this time, the turret works, and the miner moves around, but it refuses to mine!
I find this awefully peculiar, my theory now is that the arrangement of module tags within an entry has some kind of effect on it. But perhaps there is somethign about having a turret that negates being able to gather resources in Zero Hour? _________________ Please, read the signature rules of the forum. Last edited by DaFool on Sat Jul 11, 2009 11:52 pm; edited 1 time in total QUICK_EDIT
I finally checked out their harvester coding, and was able to figured out what I did wrong. Basically there is a module for turrets that everything with a turret has. It's an "AIUpdate" type of module, and when I had the turret module in addition to the harvester module, the game would only choose one. Now, the SWR team actually put the coding for the turret inside of the module that tells the game that the unit is a harvester. So, the correct coding is as shown:
Code:
Behavior = SupplyTruckAIUpdate ModuleTag_03
MaxBoxes = 4
SupplyCenterActionDelay = 400 ; ms for whole thing (one transaction)
SupplyWarehouseActionDelay = 1000 ; ms per box (many small transactions)
SupplyWarehouseScanDistance = 700 ;350 ; Max distance to look for a warehouse, or we go home. (Direct dock command on warehouse overrides, and no max on Center Scan)
SuppliesDepletedVoice = SupplyTruckVoiceSuppliesDepleted
Turret
TurretTurnRate = 180 ;60 // turn rate, in degrees per sec
ControlledWeaponSlots= PRIMARY
End
AutoAcquireEnemiesWhenIdle = Yes
End
_________________ Please, read the signature rules of the forum. QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum