|
Tiberian Technologies Scripts Reference Revision: 9000
|
Ore Miner. More...
#include <dp88_ar.h>
This class contains the basic logic for the ore miners used in Apocalypse Rising and supports both AI and player controlled miners. A miner can collect ore from any ore fields defined by a script zone with the dp88_AR_Ore_Field_Zone script attached to it, which determines the value of each ore 'unit' in that field, thus implicitly supporting gem fields with the same scripts.
The miner can hold up to a configurable number of ore units, each of which takes a configurable amount of time to mine from the ore field. Mining is achieved by remaining inside an ore field whilst ore units are 'collected'.
Miners can deposit ore at any time as long as they have at least one unit mined, with the total value of the deposit being based on the number of units collected and the value of each unit. Ore deposits are achieved by entering a script zone with the dp88_Ore_Dump_Zone attached to it with the team parameter matching that of the miner.
When the AI is enabled the miner will use the pathfind grid to locate the nearest ore field and drive to it to begin mining. Once it has collected a full load of ore it will locate the nearest ore deposit zone and drive there to unload it's ore. This will be repeated ad-infinitum until the miner is destroyed. If you have problems with the miner getting stuck on terrain or other objects you should place pathfind blockers around the problematic areas and re-generate pathfind data to make it route around those locations.
| Use_AI | Specifies that this miner should use its AI to mine autonomously. 1 to enable AI, 0 otherwise |
| Ore_Capacity | Maximum number of ore units this miner can store |
| Ore_Mining_Time | The amount of time, in seconds, it takes to mine one ore unit from an ore field |
| Ore_Dump_Time | The amount of time, in seconds, it takes to unload all ore units at an ore deposit zone |
| AI_Init_Delay | If the miner AI is enabled this specifies the initial delay before starting the first AI action, which is required to avoid the original Renegade Harvester AI overriding this one. |
| Dump_Animation | An optional animation to be played when depositing ore at a refinery |
| Dump_Sound | An optional sound effect to be played when depositing ore at a refinery |
| Mining_Animation | An optional animation to be played in a loop whilst mining in an ore field |
| Mining_Sound | An optional sound effect to be played each time the ore load level increases |
| Idle_Animation | An optional animation to be played in a loop when the miner is not mining or docked |
| Resource_Name | The name of hte resource field (defaults to ore if none is specified) |