| 07-24-2003, 09:54 PM | #1 |
Does anyone know if there is a way to determine whether or not a given unit is carrying gold? I can't find anything in the triggers or in the *.j or common.ai files :( What I need this for is this: I'm working right now on getting Oil to work as a custom resource. I've created "Oil Platforms" with a slightly modified "Gold mine ability" (DataC1 "Mining Capacity" changed to 999999 and DataB1 "Mining Duration" changed to 4.00) and made them only buildable on my custom "Oil Patch" units. I have a custom "Refinery" that serves as a drop off point for the oil (it has the "Return Gold" ability) and I have "Oil Tankers" which have a slightly modified "Harvest Gold" ability (DataC1 "Gold Capacity" changed to 100). I want to detect when the Tanker leaves the Platform with the "gold" so that I can either remove the gold from the unit, or replace the unit with one that is not carrying gold. Thanks! |
| 07-24-2003, 10:00 PM | #2 |
I'm not entirely sure about the nature of your platform, but it seems like you should be able to make a trigger that relates the relative position of the tanker unit as it starts at 0 distance and moves away. Or, can the tankers move away without gold? That'd shoot my idea, since you'd only be detecting if the unit leaves, not whether it has gold at all. |
| 07-24-2003, 10:12 PM | #3 |
Yeah, you can move them right next to/on top of the Oil Patch without initiating the Harvest procedure. |
