Alternatives to Locust? Unselectable, but still...

ninjaalamode

New Member
Reaction score
0
I've been using locust on the units in my map to make player controlled units unselectable, but it doesn't seem to allow for them to be picked in triggers, and they can't be hit by spells either.

Is there an alternative to Locust units that allows for a player controlled unit to be unselectable, yet still able to be picked through triggers, and still able to be hit by spells?
 

Jedi

New Member
Reaction score
63
Pick every units owned by player, picks units with locust.But I doubt you can damage them.If you are going to deal damage with triggers, you can remove locust before deal.
 

ninjaalamode

New Member
Reaction score
0
Removing Locust before the main part of the trigger goes off sounds like it would work, but I can't seem to find the actual ability in the Unit - Add Ability GUI. I tried looking for it in the object editor as well, but I couldn't seem to find it.
 

roXplosive

New Member
Reaction score
15
You can add it directly with the editor when editing a unit . If you need to add it in a trigger use the following custom text :
JASS:
call UnitAddAbility(yourunit,'Aloc')


take care since 'Aloc' is case sensitive and represents a number it is different from 'aloc'
 

Jedi

New Member
Reaction score
63
Create an ability variable with name Locust, and add this action to a trigger that fires at map initialization.
Trigger:
  • ATriggerWhichFiresInitialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: set udg_Locust = 'Aloc'
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Create an ability variable with name Locust, and add this action to a trigger that fires at map initialization.
Trigger:
  • ATriggerWhichFiresInitialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: set udg_Locust = 'Aloc'

Don't you mean integer variable?
 

ninjaalamode

New Member
Reaction score
0
So, I added that map initialization trigger with Locust as an ability variable, messed with my ability trigger a bit to add in removing Locust, and it doesn't seem to work.

This is what I have for my trigger...

Trigger:
  • CQC
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to CQC
    • Actions
      • Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units owned by (Picked player) matching ((Distance between (Position of Soldier[(Player number of (Owner of (Casting unit)))]) and (Position of (Matching unit))) Less than or equal to 250.00)) and do (Actions)
            • Loop - Actions
              • Unit - Remove Locust from (Picked unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current order of Soldier[(Player number of (Owner of (Casting unit)))]) Equal to (Order(<Empty String>))
        • Then - Actions
          • Unit - Order Soldier[(Player number of (Owner of (Casting unit)))] to Orc Tauren Chieftain - War Stomp
          • Unit Group - Pick every unit in (Units within 250.00 of (Position of Soldier[(Player number of (Owner of (Casting unit)))]) matching ((((Matching unit) belongs to an ally of (Owner of (Casting unit))) Equal to False) and ((Matching unit) Not equal to Soldier[(Player number of (Owner of (Cas and do (Actions)
            • Loop - Actions
        • Else - Actions
          • Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + 50.00)


The very first part is where I tried to make it so the trigger would select units within range of a certain unit and then remove Locust, so that in the later part of the trigger they could be selected normally. The trigger runs fine except for the parts involving the picked units that I've been trying to remove Locust from.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
You actually can't pick Locusted units with most "picking-methods", but one that works is "Pick every unit of player", so I would suggest you first pick (All players) and then pick every unit owned by (Picked player) and it should work ;)
 

ninjaalamode

New Member
Reaction score
0
You actually can't pick Locusted units with most "picking-methods", but one that works is "Pick every unit of player", so I would suggest you first pick (All players) and then pick every unit owned by (Picked player) and it should work ;)
That's pretty much what I did in the first part of the trigger, except I used "all players matching a condition". I changed it to just "all players" and it still doesn't work.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Sorry, I just realized that I didn't actually look for that XD

Ok, but can you show the trigger where you set this 'Locust' variable ? :eek:
 

ninjaalamode

New Member
Reaction score
0
Yurp, here ya' go.
Trigger:
  • LocustInitialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: set udg_Locust = 'Aloc'
 

Bogrim

y hello thar
Reaction score
154
Don't you mean integer variable?
Although ability GUI variables are basically just integer variables, you still need to specify it as an ability for the variable to appear in the drop-down menu of variables when selecting an ability in the GUI.
 

educator

New Member
Reaction score
9
couldnt you just use a trigger to force anyone who selects the unit to deselect it imediatly (this would allow the unit to be the target of 'unit target' spells)
 

ninjaalamode

New Member
Reaction score
0
couldnt you just use a trigger to force anyone who selects the unit to deselect it imediatly (this would allow the unit to be the target of 'unit target' spells)
No, when you do that the player still has enough time to give the unit orders if he/she is fast enough.

Also, I've know tried targeting a specific pre-placed unit and removing locust from it with "Unit - Remove Locust from Soldier 0026", and yet the unit still acts as though it has Locust and isn't able to be picked through triggers.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
it can be picked but not with triggers which check for units within range/rect.

this:
"Pick all units within (Playable map Area)"
or
"Pick all units within range of 128 to ..."
doesnt work.

this:
"Pick all units of player 1 red"
or
"Pick all units matching (Matching unit is Alive) Equal to True"
does work perfectly fine.
 

rotten

New Member
Reaction score
2
A simple solution is to make an invulnerable dummy with no model/shadow, flying, 0 collision size. Base it off Wisp.

Also, don't keep the dummy around for too long. Spawn it, order it to cast whatever it needs to and remove it from the game at once. With wisp base you can use kill as well, but remove is cleaner.

If they are visible units which have a longer role, just make a looping trigger that will remove all units of that type from the player's selection. This should be possible in normal World Editor if I don't have Alzheimer's. Average human reaction time is 0.2 seconds, so you can give it this interval, but it may cause lag.

Use Unit group - pick every unit in units currently selected by target player, if unit type is X, remove it from selection.
 

ninjaalamode

New Member
Reaction score
0
Well, my problem is fixed, thanks for the help everyone. I ended up making the units not actually owned by the players themselves, so that they couldn't give them any orders. Everything seems to be working fine now.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top