Warcraft III resources & community, 2003–2006 · archived

How can I make a 'training' system like in Battle Realms?

18 posts
#16
Deathbringerbut u had it in JASS form didnt you?


only the part imbeded within the lines //CUSTOM SCRIPT and //END CUSTOM SCRIPT

the other part with E/C/A were triggers

but not that it really matters, as long as he gets it working
#17
i have an easy way to build this system. what you need is symple a building having an dummy spell targeting only one unit, your worker and your produkt the soldier

events - unit - unit starts casting an abilty
conditions - ability beeing cast equal <<dummy spell>>
actions - if - then - else---multiple functions
condition - unit type of ability beeing cast equal to
<<worker>>
then -unit - remove unit of ability beeing cast
-unit - order casting unit to train/upgrade
<<soldier>>
else - do nothing

this one should work nearly perfectly. your worker will be removed and the building starts to train your soldier. but if your soldier takes 2 supplie while your worker takes only one and your current supply is for instance 70/70, the worker will be remove -> 69/70 and your soldier wont be upgradet caus it would be 71/70 and you wont be noticed that you need more supply so either synchronize the supply, or include into the trigger a function which disables the removing and training.
hope this helps you.
#18
Devran04i have an easy way to build this system. what you need is symple a building having an dummy spell targeting only one unit, your worker and your produkt the soldier

events - unit - unit starts casting an abilty
conditions - ability beeing cast equal <<dummy spell>>
actions - if - then - else---multiple functions
condition - unit type of ability beeing cast equal to
<<worker>>
then -unit - remove unit of ability beeing cast
-unit - order casting unit to train/upgrade
<<soldier>>
else - do nothing

this one should work nearly perfectly. your worker will be removed and the building starts to train your soldier. but if your soldier takes 2 supplie while your worker takes only one and your current supply is for instance 70/70, the worker will be remove -> 69/70 and your soldier wont be upgradet caus it would be 71/70 and you wont be noticed that you need more supply so either synchronize the supply, or include into the trigger a function which disables the removing and training.
hope this helps you.


well aside from the fundamental problem that the building has to have the ability to build the soldier unit in the first place, which means instead of casting that spell the player could just click on the soldier icon to build it