• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[General] Giving units, of certain type, abilities.

Status
Not open for further replies.
Level 2
Joined
May 7, 2021
Messages
4
Hello,
I would like to ask how can you add certain abilities to units of type, that means even those that aren't on the map (like units that are trained afterwards)
 
I don't fully understand your question so maybe one of these two answers will help:

Go into the Object Editor, find the unit-type that you want to edit, and click their Abilities field where you can Add/Remove abilities.

OR

Go into the Trigger Editor and create a new trigger like so:
  • Events
  • Unit - A unit enters entire map
  • Conditions
  • Unit-type of (Triggering unit) Equal to Footman
  • Actions
  • Unit - Add Bloodlust to (Triggering unit)
Units should only ever "enter" the map once, which happens when they're first created.
 
Ty for the answer,
I have it like this:
There is 4 difficulties, and in the 4th one, units gain extra abilites, so I just add there this condition?

Or something else?
 

Attachments

  • Výstřižek.PNG
    Výstřižek.PNG
    70.8 KB · Views: 62
That seems like a good start, but if those units can also be created with triggers/trained from a barracks-type structure then they won't receive the ability.

So I would also set a Variable that tracks the difficulty:
  • Set Variable Difficulty = "Easy"
  • Set Variable Difficulty = "Medium"
  • Set Variable Difficulty = "Hard"
You can use a String variable or an Integer variable.
  • Set Variable Difficulty = 1
  • Set Variable Difficulty = 2
  • Set Variable Difficulty = 3
I prefer Integer because that allows the use of Arrays which would use your game difficulty as their [Index]. This can help keep things organized and manageable.

Now whenever a Mur'gul Reaver enters the map you can use an If Then Else statement to check the state of this difficulty variable:
  • If Difficulty Equal to "Easy" then Unit - Add Ability to (Triggering unit)
 
An easier way to do this is to give the units all abilities in the OE, but make the high difficulty abilities have a techtree requirement. When that difficultly is activated, simply research the tech for the owner of those units via triggers or create 1 of the appropriate unit hidden somewhere on the map to satisfy the techtree requirement.
 
Status
Not open for further replies.
Back
Top