- Author
- Daniel Paul (danpa.nosp@m.ul88.nosp@m.@yaho.nosp@m.o.co.nosp@m..uk)
Attach this script to an object which represents an ore (or gem) field on the map, or to a Daves arrow if you do not want animation support for growing / shrinking the field. A script zone will be created at the center of this object (it's local 0,0,0 position) which defines the area miners must enter to be considered 'inside' the ore field. This zone can grow and shrink with the ore field animation if desired.
If you attach this to a script zone directly, it will use that zone instead of spawning a new zone.
Used on it's own this script can either create an ore field with infinite capacity or one which is gradually depleted until it is empty. If you want the ore field to re-grow you must add one or more objects with the dp88_Ore_Extractor script attached.
To visually show the current size of an ore field you can use an animation on the object this script is attached to which will animate from the full frame to an empty frame as the field is depleted. If an ore extractor is present it will also animate in reverse as the field is refilled.
- Precondition
- A preset with the name "Script_Zone_All" must exist to allow the miner zone to be created. This preset should have CheckStarsOnly disabled to allow AI miners to use this ore field
- Parameters
-
| Ore_Value | The value of each unit of 'ore' mined from this field. Multiply this by the capacity of a miner to get the total credits per dump from a fully loaded miner. |
| Ore_Capacity | The maximum capacity of this ore field, in units. Set this to 0 to create an infinite ore field which never shrinks or grows. |
| Ore_Units | If Ore_Capacity is not 0 this defines the number of units in the ore field when it is created |
| Animation_Name | The name of an animation containing the frames to show ore capacity |
| Animation_Full_Frame | The frame number for the ore field when it is at maximum capacity |
| Animation_Empty_Frame | The frame number for the ore field when it is empty |
| Zone_Size | The size of the zone which miners must enter to mine ore from this field. This size is used when the field is at maximum capacity. When the zone is empty the zone will despawn. |
| Zone_Anim_Step_X | How much to shrink the miner zone in the X axis by for each frame in the animation |
| Zone_Anim_Step_Y | How much to shrink the miner zone in the Y axis by for each frame in the animation |
| AI_Ignore | The name of the resource field (defaults to ore if none is specified) |