![]() |
#1 |
User
Join Date: Aug 2008
Posts: 4
![]() |
![]() 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: ![]() where 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 Last edited by Pyrogasm : 08-31-2008 at 03:58 AM. |
![]() |
![]() |
Sponsored Links - Login to hide this ad! |
|
![]() |
#2 |
obey
|
![]() There is only one way to do it...
Personal building for every unit. |
![]() |
![]() |
![]() |
#3 |
Overdoses result in death
Join Date: Jan 2007
Posts: 2,365
![]() ![]() ![]() |
![]() 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. |
![]() |
![]() |
![]() |
#4 |
User
|
![]() 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 Last edited by aquilla : 08-31-2008 at 02:08 AM. |
![]() |
![]() |
![]() |
#5 |
User
Join Date: Aug 2008
Posts: 4
![]() |
![]() Trigger: ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() I figured a way to do this, the trained unit-type doesnt take into consideration whether the unit is canceled. And i took into concideration the gold cost of the unit by setting up a array with the index of the unitId like this: Code:
set udg_spawn_type[0] = 'h000' set udg_spawn_cost['h000'] = 5 Thanks for the help guys, and I hope this solution can help you. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
|