• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Troll Berserker

Status
Not open for further replies.
Level 3
Joined
May 5, 2015
Messages
42
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?
 
Level 3
Joined
May 5, 2015
Messages
42
nononoo
I mean in the barracks, just like the troll berserker, it's hidden until the upgrade is researched
 
Level 3
Joined
May 5, 2015
Messages
42
well thanks but now, how do i make it trainable after research? it needs a specific upgrade to be able to train that unit, trigger please?
 
Level 27
Joined
Sep 26, 2009
Messages
2,473
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.
 
Status
Not open for further replies.
Top