HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Locust-Trigger Related Question

03-09-2007, 11:44 PM#1
Hydrolisk
The ability Locust (as in unselectable and unkillable) is AKA "Aloc."

So, while I was playing around the WE, I was thinking, I should make an ability using Locust.

Unfortunately, I was planning to Add/Remove Locust to a Hero. Too bad I have to use GUI. So now, I have a few questions about this ability.

1: Can Locust be Added/Removed with JASS? (Such as I make a Add/Remove trigger in GUI than convert it to JASS and replace the "ability" part with "Aloc."
2: Can triggers affect Locust-equipped units? Can triggers also affect Hidden units?

I might have more questions, but this is all so far. Thanks.
03-10-2007, 12:01 AM#2
Dil999
To add/remove locust, just do this:
Unit - Set (Unit Variable) to (Your Unit recieving locust)
Unit - Add (Locust) to (Variable)
Unit - Remove (Locust from (Variable)

I believe some triggers can effects locusted units, but not all. For example Order triggers dont work, but thats basically all i know. The best thing to do would be to use a unit group variable for all units with locust. When doing a Pick Units trigger, just do another trigger exactly the same but picking units in your unit group.
03-10-2007, 12:08 AM#3
Hydrolisk
Aw, I swear that I can't Add/Remove Locust. That's a reason why I posted -.-
03-10-2007, 12:38 AM#4
masda70
Use the Hide Unit 'action' before attempting to remove locust from a unit. You can then 'unhide' it, making the unit selectable/vulnerable once again. The only problem is that doing this will permanently remove any UI information that appears above the unit (e.g. health bar).

In JASS:

Collapse JASS:
call ShowUnit(u,false)
call UnitRemoveAbility(u,'Aloc')
call ShowUnit(u,true)
03-10-2007, 01:06 AM#5
oNdizZ
Quote:
Originally Posted by Hydrolisk
Aw, I swear that I can't Add/Remove Locust. That's a reason why I posted -.-

Locust isn't included in the GUI list of abilities which you can add/remove to a unit, thats why youll need to use the custom script that masda70 wrote.
03-10-2007, 05:43 PM#6
Hydrolisk
I know, sheesh. Well, is there any other way? And why can't I just do Add/Remove Locust in JASS without Hiding/Showing?
03-10-2007, 06:10 PM#7
The)TideHunter(
Don't fuck with locust, it has more side effects than you think.
Sure you can add locust, you use:

call UnitAddAbility(YourUnit,'aloc')
But your not going to remove it without problems, if you want the unit to be selectable again, you need to remove it via UnitRemoveAbility, but you still wont have units life bar, other units will have targeting problems, and theres other effects, special abilities like Attack, Locust, do not show up in the object editor or trigger section for editing or adding/removing, sure they show up on the units ability bit to add it, but nowhere else.

Oh, and giving a unit Locust does not make it invunerable, it can still be attacked just fine.
And you will have to hide it then show it to successfully remove locust, but you will still have bad effects.
03-10-2007, 08:45 PM#8
Dil999
As someone said above, removing locust with jass doesnt let you see the units Bars, and maes it only selectable if you drag over it (you cant just click on it)
The easiest way around this would be to store the stats (everything, abilities, health, damage, items) in variables, then recreate a new unit using those stats.
03-11-2007, 05:33 PM#9
The)TideHunter(
Quote:
Originally Posted by Dil999
As someone said above, removing locust with jass doesnt let you see the units Bars, and maes it only selectable if you drag over it (you cant just click on it)
The easiest way around this would be to store the stats (everything, abilities, health, damage, items) in variables, then recreate a new unit using those stats.

Its not that simple.
If variables were stored to that unit, or gamecache was used, that would mess a system up.
03-11-2007, 06:32 PM#10
Hydrolisk
Well, is there a way I can make an effect LIKE Locust other than making a trigger that constantly unselects that unit?
03-11-2007, 10:26 PM#11
Pyrogasm
"Ghost (Visible)"?
03-11-2007, 10:37 PM#12
Earth-Fury
Quote:
Originally Posted by Pyrogasm
"Ghost (Visible)"?
i think thats the one that makes you invisible while attacking or the like. (i wonder what the 'visible' version does then xD) as i remember perminent invisiblity + ghost = always invisible, even when attacking. its been a while, tho..
03-12-2007, 12:05 AM#13
Pheonix-IV
Ghost (Visible) removes unit collision from the unit. So it can pass right through other units (as if it was windwalking) but is visible. Normal Ghost is exactly the same, but is always invisible.
03-12-2007, 12:36 AM#14
Hydrolisk
Does that mean normal Ghost means invisibility forever even when you use abilities?

I have noticed that whenever I try to make an ability based off of Locust SWARM, the units won't work properly (as in follows the caster) unless they have Locust (the normal one). The problem might be the fact that I changed the Locust UNITS to ground units then removed their Locust (normal) ability and gave them collision. Help?
03-12-2007, 12:50 AM#15
Earth-Fury
Quote:
Originally Posted by Hydrolisk
Does that mean normal Ghost means invisibility forever even when you use abilities?

I have noticed that whenever I try to make an ability based off of Locust SWARM, the units won't work properly (as in follows the caster) unless they have Locust (the normal one). The problem might be the fact that I changed the Locust UNITS to ground units then removed their Locust (normal) ability and gave them collision. Help?

Throgh testing / tryign of my own, it seems that the locust swarm ability is actually designed to only work properly with locust units. (as in units with the locust ability), which greatly sucks.