• 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.
  • Vote for the theme of Hive's HD Modeling Contest #7! Click here to vote! - Please only vote if you plan on participating❗️

Few Question about units.

Status
Not open for further replies.
Level 8
Joined
Apr 8, 2009
Messages
499
[SOLVED.]

Few questions about units. (involving triggers)

Lets say i have unit_1 and unit_2.

Both are heroes.
unit_1 can be used normally
unit_2 has no movement speed and cant be moved nor selected with the mouse. it can be selected with hotkeys (F2, hero hotkey.)
unit_2 cannot be seen (unit_2 doesn't have invisibility, but just cant be seen.)


1. If possible, how do i make it so unit_2 is ALWAYS. EXACTLY at the same spot as unit_1, withouth laggz or periodic timers ?
Status: SOLVED.

2. How do i exclude unit_2 from "pick all units in group/area" action, withouth using the "hide unit" action? ( i still need to be able to select it with hero hotkeys (F2) not being able to select it with dragselect/clicking on it, doesn't matter.)
Status: No longer needed. i'll just exclude unit_2 in all the triggers.

3. How do i get shops, to ignore unit_2, so that when you buy a item it won't accidentaly go to unit_2. (you must still be able to select unit_2 with the shops "select user" ability)
Status: SOLVED.

If possible, tell me a way to do this withouth Jass or vJass.
All help appreciated, +Rep given always.
 
Last edited:
Level 8
Joined
Apr 8, 2009
Messages
499
nice quick replies. you guys are awesome.

1. You need a periodic timer. Doesn't cause lag if done correctly.
2. Add Locust unit ability to it, or use a unit group filter.
3. How about not giving the unit an inventory? Or trigger it, when unit 2 buys an item give it to unit 1.

Your fast helpfull reactions are awesome.


1. how do i do it correctly?

2. never really played around with locust unit abilities, if possible link me to a explaining thread?

3. unit_2 needs a inventory (its your xtra bag as to speak) it just shouldnt be auto selected by the shops.


I played a little with triggers a while time ago...
Maybe this map can help you :ogre_kawaii:

Before i open that map, wanna know whats in it, if that could help me and in which of your triggers i should look.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Locust is an ability which makes a unique spell. It can also acts as a "helper" of a certain spell for it to work. Example would be this spell:

Blast From The Past
Lets out a grueling voice inside of the unit, causing any enemy units in 600 AOE to be stunned and damaged.

I based this spell from "Roar" but that is only for the spell to work. Next, I added Locust-ed unit along with locust ability to the Roar Trigger to make the spell worked.
As you can see (after downloading and testing and reading the triggers) you can understand that Locust ability and units can create a diversity of millions of spell, you just have to get creative !
Its job is only Appear (Create 1 dummy casting stun) , Order (stuns the enemy units) the dummy (Last created unit) to stun them and disapear (Add Expiration Timer, this is to avoid unit creation leaks)
 

Attachments

  • Locust , Dummy.w3x
    14 KB · Views: 46
Level 8
Joined
Apr 8, 2009
Messages
499
Locust is an ability which makes a unique spell. It can also acts as a "helper" of a certain spell for it to work. Example would be this spell:

Blast From The Past
Lets out a grueling voice inside of the unit, causing any enemy units in 600 AOE to be stunned and damaged.

I based this spell from "Roar" but that is only for the spell to work. Next, I added Locust-ed unit along with locust ability to the Roar Trigger to make the spell worked.
As you can see (after downloading and testing and reading the triggers) you can understand that Locust ability and units can create a diversity of millions of spell, you just have to get creative !
Its job is only Appear (Create 1 dummy casting stun) , Order (stuns the enemy units) the dummy (Last created unit) to stun them and disapear (Add Expiration Timer, this is to avoid unit creation leaks)

Sooooo, if i give unit_2 the "Locust" unit ability, it wont be selectable. neither by clicking/drag box or by "pick all units in group/area" actions, right?
but you should still be able to select it with Hero Hotkeys (F1,F2,F3,F4 etc.etc) right?

gonna test it anyways, but i like confirmation ;D.


EDIT--------------------------------------------

Locust doesn't seem like a solution. as i wont be able to select unit_2 with hotkey (F2) anymore. which i should be able to do.

Does anyone know why Locust isn't in the standard abilities list and why i cant create a custom ability based on "Locust" (since it isn't in the list of choosable abilities).
 
Last edited:
for the third, I dont think that you can remove a unit from the targets of the shop...

do Maker's suggestion, just remove the item from unit 2 and give it to unit 1 if unit 2 buys the item... then if unit 1 has full inventory dont do the switch...


or rather than using an extra bag using units... you can use an extra inventory system...

example you have an ability which will replace your current inventory into the next inventory and so on...

EDIT: I have no problem with locust, I can see it... but I think there is a field in the OE that sets that... but why make a custom locust??? what it does is just make a unit unselectable, invulnerable (I think) and pathing ignored...
 
3. How do i get shops, to ignore unit_2, so that when you buy a item it won't accidentaly go to unit_2. (you must still be able to select unit_2 with the shops "select user" ability)
Status: not solved.

EDIT

i think you must remove the 'inventory' of that unit, if not then make a trigger that if the shop sellect unit2 then desellect unit2 and sellect unit1

OR you can always use spellbook for your backpack
 
Last edited:
Level 8
Joined
Apr 8, 2009
Messages
499
EDIT

i think you must remove the 'inventory' of that unit, if not then make a trigger that if the shop sellect unit2 then desellect unit2 and sellect unit1

OR you can always use spellbook for your backpack

unit_2 needs an inventory so myeah....
i'll probably have to fix it with triggers.

can you explain the thing about using a spellbook for a inventory?
 
Status
Not open for further replies.
Top