• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Giving Locust Ability to a Hero?

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
1st of all, Locust is NOT meant to be a HERO TYPE SPELL as this is ONLY suitable for DUMMY UNITS
This ability MUST be put into Abilities - Normal, field in order for it to work
It's IMPOSSIBLE for it to become a hero spell (unless you want a Locust Swam-based spell, now that's different) but if you want a raw Locust-based spell, I'm afraid it can't be done
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
It's possible.

Default locust: (hero always has locust)

Go to the object editor and select the hero you want to give locust.
Go to "Abilities - Normal" and add the ability Locust.

adddefault.jpg



Hero Ability Locust: (Locust can be researched as an ability)

Again, go to the hero you wish to give locust.
Now, go to "Abilities - Hero" and SHIFT + ENTER it, this will give you a little bar to type stuff in.
Behind all other values, type in "Aloc" (this a comma if there are multiple abilities) - THIS IS CASE SENSITIVE.

addhero.jpg


Edit: defskull, it's possible :D (see above)

And if this isn't what you meant, it's your fault for not describing it properly.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Okay...
I'm not master in Shift + Enter thingy yet so...
Thanks for clearing that up ^^

EDIT:
HOWEVER, a Locust spell for Hero is a... BAAAD idea don't you think ap0 ?
Mehh, I only know it because I was bored (about a year ago though) and tested all those things with shift + enter.

And yes, it's a bad idea :p
I wouldn't even know how you could possiby use that >_< you research an ability and suddenly you can't click your hero anymore... :p
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
It is.
JASS:
call UnitAddAbility(GetTriggerUnit(), 'Aloc')

Add the above line in a Custom script, wherever you want a unit to have locust.

NOTE: it only gives the triggering unit the ability.
For "Picked Unit", replace "GetTriggerUnit()" with "GetEnumUnit()".
I think those two are the most important for this...
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
It is.
JASS:
call UnitAddAbility(GetTriggerUnit(), 'Aloc')

Add the above line in a Custom script, wherever you want a unit to have locust.

NOTE: it only gives the triggering unit the ability.
For "Picked Unit", replace "GetTriggerUnit()" with "GetEnumUnit()".
I think those two are the most important for this...

How do you find all that stuff out? How the hell should people know ''Picked Unit'' in Jass is ''EnumUnit''? :I

Is there some kind of list for this?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
How do you find all that stuff out? How the hell should people know ''Picked Unit'' in Jass is ''EnumUnit''? :I

Is there some kind of list for this?
Lol :p I created a list for it, yes xD

But it's actually rather easy:
Go to the trigger editor and create a GUI trigger with "Picked unit" in it somewhere.
Then go to Edit -> Convert to custom text et voila.

Over time, you'll remember them - they're actually quite easy to remember ^^
 
Level 11
Joined
Aug 6, 2009
Messages
697
Lol :p I created a list for it, yes xD

But it's actually rather easy:
Go to the trigger editor and create a GUI trigger with "Picked unit" in it somewhere.
Then go to Edit -> Convert to custom text et voila.

Over time, you'll remember them - they're actually quite easy to remember ^^
I'd rather spend my time learning more advanced programming languages.
 
Level 8
Joined
Jun 16, 2008
Messages
333
Here is a spell that I learned. but this one gives it to all units on map. IT was for a maze
JASS:
 function Trig_Untitled_Trigger_001_Func001Func001A takes nothing returns nothing
    call UnitAddAbilityBJ( 'Aloc', GetEnumUnit() )
    call ShowUnitHide( GetEnumUnit() )
    call ShowUnitShow( GetEnumUnit() )
endfunction

function Trig_Untitled_Trigger_001_Func001A takes nothing returns nothing
    call ForGroupBJ( GetUnitsOfPlayerAll(GetEnumPlayer()), function Trig_Untitled_Trigger_001_Func001Func001A )
endfunction

function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    call ForForce( GetPlayersAll(), function Trig_Untitled_Trigger_001_Func001A )
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Untitled_Trigger_001, 30.02 )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
all you got do do is make a trigger then add ability and pick watever, then change it to jass then the spell that you choose (its like Athe, EtpF ect) and change it with Aloc
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Can it be possible giving Locust ability through TRIGGER ?
DUDE! I already answered that!
Please read the thread before replying?! You look stupid like this.

Here is a spell that I learned. but this one gives it to all units on map. IT was for a maze
JASS:
 function Trig_Untitled_Trigger_001_Func001Func001A takes nothing returns nothing
    call UnitAddAbilityBJ( 'Aloc', GetEnumUnit() )
    call ShowUnitHide( GetEnumUnit() )
    call ShowUnitShow( GetEnumUnit() )
endfunction

function Trig_Untitled_Trigger_001_Func001A takes nothing returns nothing
    call ForGroupBJ( GetUnitsOfPlayerAll(GetEnumPlayer()), function Trig_Untitled_Trigger_001_Func001Func001A )
endfunction

function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    call ForForce( GetPlayersAll(), function Trig_Untitled_Trigger_001_Func001A )
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Untitled_Trigger_001, 30.02 )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
all you got do do is make a trigger then add ability and pick watever, then change it to jass then the spell that you choose (its like Athe, EtpF ect) and change it with Aloc
Agh, ugly converted GUI with only 1 change (ability to 'Aloc', what I said in the first place).
This is quite horrible, sorry :p
 
Status
Not open for further replies.
Top