| 08-30-2008, 10:15 AM | #1 |
So I'm working on a training system where i can dynamically change the training time so an ability will give the player a 10 second chance to have instant training. This is what have so far: Trigger: Trainingwhere i have ######## i want to get the trained unit, except (trained Unit) gets the unit only if the training is finished. Is there a 'GetAboutToBeTrainedUnit ()' function that i am not aware of? If only in JASS im completely comfortable in that. Thanks, Krambuhl |
| 08-30-2008, 10:53 AM | #2 |
There is only one way to do it... Personal building for every unit. |
| 08-30-2008, 11:41 AM | #3 |
There's a method but it's not the cleanest. 1. Give the building a spell book with the list of trainable units but DO NOT let it be able to train any 2. When it uses a training order, allow it to train a unit 3. Train that unit > If it's X then give money back 4. Disallow it from training that unit I don't have World Editor with me at the moment, but I hope that helps. By the way, your current method encourages spam because if you cancel training, you get money back. |
| 08-31-2008, 01:00 AM | #4 |
I would assume that the unit beginning the training is issued an order where the unit to trained would be its OrderId. Did you try this approach? If it is indeed so it would be fairly simple to catch the id edit: it wouldn't be as simple to make it unexploitable |
