Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Hey guys i'm making a rts map and i'm having problem with units,
I can't hide units like the Troll Berserker does
does anyone know how to hide unit? How?
Maybe something like this would work. Then make it available after researching the upgrade.
[trigger=Trigger]
Actions: Player - Make YourUnit Unavailable for training/construction by Player 1 (Red)[/trigger]
No need for much triggering. All you need to do is to just set the same what Troll Headhunter and Troll Berserker sets in object editor. The only triggered thing is afaik setting Berserker to be unavailable for every player.
In the example I'm about to show, I'll be morphing Footman into Knight the same way Troll Headhunter morphs into Troll Berserker.
What to do:
First, the trigger.
Map Ini
Events
Map initialization
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Make Knight Unavailable for training/construction by (Picked player)
This makes Knight unavailable to be trained. This is all that needs to be triggered.
Now to object editor:
1) Making an upgrade
Go to "Upgrades" tab in the editor. Create new upgrade and base it off "Berserker Upgrade" upgrade (found under orc tab)
Set "Data - Effect 1 - Unit Type Affected" to Footman (this is the old unit)
Set "Data - Effect 2 - Unit Type Affected" to Knight (this is the new unit)
Edit other fields to your liking (icon, gold/lumber cost, description, etc.)
2) Creating new ability
Go to "Ability" tab in object editor. Make an ability based off "Berserker Upgrade" abilty
Set "Data - New Unit type" to Knight (this sets the unit into which your unit morphs!)
Set "Techtree - Requirement" to the upgrade you created in previous step
3) Editing Footman unit
Find Footman under "Unit" tab in Object editor
Edit the field "Techtree - Dependency Equivalent" and add there the Knight unit
Add new ability to your Footman unit, give it the ability you created in previous step.
That is all.
----
So what happens actually?
The trigger makes every player be unable to train Knight unit.
The upgrade actually enables your player to train Knights and disables Footman for that player.
The ability causes your Footman units to morph into Knight units. However this ability won't activate until you research the upgrade (hence why it has in the "Requirements" the upgrade).
And your Footman units have to have the ability itself, so the game knows which units it morphs into Knights.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.