• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Add "Locust"?

Status
Not open for further replies.
Level 5
Joined
Sep 10, 2006
Messages
185
Go to Actions, and scroll to "Custom script". Then, type this: "call UnitAddAbility (GetTriggerUnit(), 'Aloc')". So, this, would look like this in the Editor:
  • Custom script: call UnitAddAbility (GetTriggerUnit(), 'Aloc')
GetTriggerUnit() is the equivalent of Triggering Unit in GUI.

Can't see why you'd want to add it to triggering unit in most cases (if it's for an ability)

  • Custom script: call UnitAddaBility (GetLastCreatedUnit(), 'Aloc')
if you want to add it to a created dummy unit :)
 
Level 5
Joined
Sep 10, 2006
Messages
185
I know, it's an example; believe it or not though, I used to add locust to some caster though, because I wanted to disable him from being controlled afterwards (campaign related issue). ;)

I knew it was an example, but not everyone knows how to find the jass equiv of some of the gui thingamajiggers. Thought I'd save him some google time if he wanted to add it to a dummy unit.
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
GetLastCreatedUnit() is some embellished crap Blizzard through in the code to try to make it seem like GetTriggerUnit() or GetAttacker(). It's not. That facade of a script only returns the value "bj_lastCreatedUnit" which only applies if the unit was created through an embellished BJ function to begin with! :D

People using GUI who create units with the useless CreateNUnitsAtLoc function would do better to reference bj_lastCreatedUnit instead of GetLastCreatedNonsense
 
Last edited:
Level 5
Joined
Sep 10, 2006
Messages
185
GetLastCreatedUnit() is some embellished nonsense Blizzard through in the code to try to make it seem like GetTriggerUnit() or GetAttacker(). It's not. That facade of a script only returns the value "bj_lastCreatedUnit" which only applies if the unit was created through an embellished BJ function to begin with.

GUI noobies who still create units with the useless CreateNUnitsAtLoc function would do better to reference bj_lastCreatedUnit instead of GetLastCreatedBullshit

umad bro?

If it works it works. Don't think anyone will take your advice when you insult them.
 
Status
Not open for further replies.
Top