Unit train unit

Status
Not open for further replies.
Level 8
Joined
Feb 11, 2016
Messages
238
Ok folks, I need help. I need to make unit can train other units. I know how to make ability cost resources, but if I do this with ability I will not have normal training time, so please help.

Not important:
I try to make this, but nothing what I try works, then I try to find on internet, but I don't find, maybe it's already posted on HIVE Workshop, but I don't find it, so I think it's only way to do this.


Thank you everyone.
 
Level 16
Joined
Mar 25, 2016
Messages
1,327
In the object editor there is the option "is a Building". Activating/deactivating this option will bring up different fields: Train unit for example can only be edited, while is a Building is enabled. However if you change is a Building the fields that are no longer visible still have their effects, so set a unit to a building, change units trained and change it back to a unit should work.

It's kind of bugged, so I would use a different solution. The ability you mentioned plus a progress bar can work, but it requires advanced trigger knowledge. You won't be able to have the same UI as buildings have.
 
Level 8
Joined
Feb 11, 2016
Messages
238
Thank you again. BUT! Finally I FIND the possible way. I found a solution and I will give it very detailed here.

1. Open "World Editor" or "worldedit".
2. Open "Object Editor".
3. Click "Ctrl" + "Shift" + "N".
4. In section "Base Ability" chose "Unit".
5. In list of abilities, scroll down and chose "Charge Gold and Lumber".
6. Name the ability.
7. Click "OK".
8. Find "Data - Gold Cost", open it and put value which you want and then click "OK".
9. Do same thing for "Data - Lumber Cost".
10. Close "Object Editor".
11. Open "Trigger Editor".
12. Click "Ctrl" + "T".
13. Click "Ctrl" + "E".
14. In second section (bigger section, where is "Map Initialization") find (down) and chose "Unit - Generic Unit Event".
15. In section "Event Text" click on "Dies".
16. Again click on "Dies" to open a new section. 17. In new section find "Starts the effect of an ability".
18. Click "OK".
19. Click "OK" again.
20. Click "Ctrl" + "D".
21. In second section (bigger section, where is "Boolean Comparison") find (up) and chose "Ability Comparison".
22. Open "Animate Dead".
23. In section "Value" change "Hero" to "Unit" and "All" to "Custom".
24. Then it will filter your ability, chose it.
25. Click "OK".
26. Click "OK" again.
27. Click "Ctrl" + "R".
28. In second section (bigger section, where is "Do Nothing") find (up) and chose "Wait".
29. In section "Action Text" click on "2.00".
30. In section "Value" write training time you want to unit have in seconds.
31. Click "OK".
32. Click "OK" again.
33. Click "Ctrl" + "R".
34. In second section (bigger section, where is "Do Nothing") find (down) and chose "Unit - Create Units Facing Point".
35. In section "Action Text" open "Footman".
36. In section "Value" chose unit what you want to be trained.
37. Click "OK".
38. Open "Player 1 (Red)".
39. Select "Function".
40. In this section find and chose "Owner Of Unit".
41. Click "OK".
42. In section "Action Text" open "(Center of (Playable map area))".
43. In selected section "Function" open "Center Of Region" and chose (down) "Unit - Position Of Unit".
44. Click "OK".
45. In section "Action Text" open "(Position of (Triggering unit))".

If you wan to trained units be turned normal when arise then don't do action "46", if you want to your trained units be turned at random side when arise then do action "46".

46. In selected section "Function" open "Unit - Position Of Unit" and chose "Random Point In Region". (Make sure that region is "Playable map area".)
47. Click "OK".
48. Click "OK" again.
49. Close "Trigger Editor".

That's all, when it's done, it's need to look like this:
236703-874c89cbaa674e19ad07794d2833436b.jpg


After all you can make cooldown for that ability, what is for me better opinion and don't forgot to make "Button Position", "Icon", text and maybe some effects. Have a nice day, I love you.
 

Attachments

  • Untitled.png
    Untitled.png
    22.3 KB · Views: 153
Status
Not open for further replies.
Top