• 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.

hard question

Status
Not open for further replies.
Hello!i got one idea for my map from a awesome guy,well let's go to the point,can you guys please teach me is it possible to make a hidding spot like in league of legends,what i mean is that a unit when enter the bush is hidden and when the enemy unit goes in the same bush then they see the hidden unit and the hidden unit see the enemy unit,so people please can you teach me how to make that trigger?

P.S. i forgot to say is it possible to do it without regions?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,286
SC2 natively supports this mechanic as used in melee maps and Heroes of the Storm.

The only solution in WC3 is...
try using line of sight blockers around the bush.
Sure the bushes will appear in the fog of war but the result is better than nothing and whatever is in them is in the fog of war as well. I believe this is sort of what SC2 does even.

All terrain should be revealed anyway in multiplayer maps so not seeing the bush in the first place should not be a problem.
 
Level 10
Joined
Aug 30, 2007
Messages
270
You also can make special 'invisible platform' doodads with a height level greater than 0 (so 1,2,3 and so on) set in object editor. You then can lower them down into the ground with crtl + page down. This will behave like a higher cliff level, but you can pass it without being flying. The only 'downside' is that you are bound to WC3 using a grid for placing things with pathing, unless you want to draw a special pathing texture for every single grass you want to make
 
Level 12
Joined
May 9, 2009
Messages
735
I'd say the easiest way to do this is to use a specific tile type beneath the bush. Then if a unit stands on that tile set transparency to 100% for the local player. There is a tutorial of how to do that in the GUI section.
You also can make special 'invisible platform' doodads with a height level greater than 0 (so 1,2,3 and so on) set in object editor. You then can lower them down into the ground with crtl + page down. This will behave like a higher cliff level, but you can pass it without being flying. The only 'downside' is that you are bound to WC3 using a grid for placing things with pathing, unless you want to draw a special pathing texture for every single grass you want to make

These methods won't allow the enemy to see the unit when inside the bushes himself... they also will make it difficult for controlling player or allies to see the unit.

try using line of sight blockers around the bush.

This method will make it impossible to see outside from the bush.

This is what I will suggest if you don't want the above side-effects.
When a unit enters the bush use a dummy unit to make it invisible, unless an enemy unit is already hiding in the bush. Also when a unit enters the bush it turns an enemy inside visible. When the unit leaves the bush use a dummy unit to dispel the invisibility from it.

The only bad thing about this method is that units that are detected in the bush must leave and reenter to gain invisibility... and that it uses regions... I don't know what you don't like about them though.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,286
This is what I will suggest if you don't want the above side-effects.
When a unit enters the bush use a dummy unit to make it invisible, unless an enemy unit is already hiding in the bush. Also when a unit enters the bush it turns an enemy inside visible. When the unit leaves the bush use a dummy unit to dispel the invisibility from it.

The only bad thing about this method is that units that are detected in the bush must leave and reenter to gain invisibility... and that it uses regions... I don't know what you don't like about them though.
Except that allows units to see "over" the bushes what is behind them, something that is undesirable and does not reflect bush mechanics in Heroes of the Storm or StarCraft II. The units are meant tbe be hidden by lacks of line of sight, not invisible. If a unit is made invisible then it can be seen by any unit with detection (eg Arcane Tower) which is not desired.

Alpha methods also do not work as they will not hide effects such as hero glow.
 
Level 12
Joined
May 9, 2009
Messages
735
Except that allows units to see "over" the bushes what is behind them, something that is undesirable and does not reflect bush mechanics in Heroes of the Storm or StarCraft II. The units are meant tbe be hidden by lacks of line of sight, not invisible. If a unit is made invisible then it can be seen by any unit with detection (eg Arcane Tower) which is not desired.

Alpha methods also do not work as they will not hide effects such as hero glow.

The system wanted to reflect that of league of legends. In LoL champions that have been spotted inside a bush can be seen by all allied champions of the spotter, regardless of then being or not being inside the bush.

Edit: I think I didn't read correctly... either way in LoL you can see the bush area as it does not limit line of sight, you can see behind them. If the system wants to be like in LoL then that is not a problem. For all intents and purposes I think the limiting of line of sight around the bush makes the bush redundant as you cannot hide in it to ambush people since you can't see anyone coming.
 
Level 12
Joined
May 9, 2009
Messages
735
Okay I have done the trigger but for some reason my game freezes whenever the unit enters the bush. I can't for the life of me find out why :vw_wtf: The trigger is perfect without any leaks or anything.

  • Entering Bush
    • Events
      • Unit - A unit enters Bushes <gen>
    • Conditions
    • Actions
      • Set PositionEnteringBush = (Position of (Entering unit))
      • Unit - Create 1 Dummy Spellcaster for (Owner of (Entering unit)) at PositionEnteringBush facing Default building facing degrees
      • Unit - Order (Last created unit) to Human Sorceress - Invisibility (Entering unit)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Set GroupBush = (Units in Bushes <gen>)
      • Unit Group - Pick every unit in GroupBush and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy Spellcaster for (Owner of (Entering unit)) at PositionEnteringBush facing Default building facing degrees
          • Unit - Order (Last created unit) to Human Priest - Dispel (Picked unit)
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_PositionEnteringBush)
      • Custom script: call DestroyGroup (udg_GroupBush)
  • Leaving Bush
    • Events
      • Unit - A unit leaves Bushes <gen>
    • Conditions
    • Actions
      • Set PositionEnteringBush = (Position of (Leaving unit))
      • Unit - Create 1 Dummy Spellcaster for (Owner of (Entering unit)) at PositionEnteringBush facing Default building facing degrees
      • Unit - Order (Last created unit) to Human Priest - Dispel (Leaving unit)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_PositionEnteringBush)
 

Attachments

  • BushTest.w3x
    19.5 KB · Views: 24

Chaosy

Tutorial Reviewer
Level 41
Joined
Jun 9, 2011
Messages
13,239
Okay I have done the trigger but for some reason my game freezes whenever the unit enters the bush. I can't for the life of me find out why :vw_wtf: The trigger is perfect without any leaks or anything.

  • Entering Bush
    • Events
      • Unit - A unit enters Bushes <gen>
    • Conditions
    • Actions
      • Set PositionEnteringBush = (Position of (Entering unit))
      • Unit - Create 1 Dummy Spellcaster for (Owner of (Entering unit)) at PositionEnteringBush facing Default building facing degrees
      • Unit - Order (Last created unit) to Human Sorceress - Invisibility (Entering unit)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Set GroupBush = (Units in Bushes <gen>)
      • Unit Group - Pick every unit in GroupBush and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy Spellcaster for (Owner of (Entering unit)) at PositionEnteringBush facing Default building facing degrees
          • Unit - Order (Last created unit) to Human Priest - Dispel (Picked unit)
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_PositionEnteringBush)
      • Custom script: call DestroyGroup (udg_GroupBush)
  • Leaving Bush
    • Events
      • Unit - A unit leaves Bushes <gen>
    • Conditions
    • Actions
      • Set PositionEnteringBush = (Position of (Leaving unit))
      • Unit - Create 1 Dummy Spellcaster for (Owner of (Entering unit)) at PositionEnteringBush facing Default building facing degrees
      • Unit - Order (Last created unit) to Human Priest - Dispel (Leaving unit)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_PositionEnteringBush)

I am pretty sure this wont work either way. Not because of the triggers but because I think he wants the unit to be able to fight while in the bush. The default invisibility spell doesn't allow this. LoL got this functioonality which he took as an example.

what about creating a visibility modifier at a region around the bush? it would be destroyed if the hero leaves it.
This would work. However it isn't flexible. This forces him to have all his bushes in certain angles due how the regions work.
 
Level 12
Joined
May 9, 2009
Messages
735
I am pretty sure this wont work either way. Not because of the triggers but because I think he wants the unit to be able to fight while in the bush. The default invisibility spell doesn't allow this. LoL got this functioonality which he took as an example.



The unit can fight inside the bush. If there nobody in the bush he can't fight anyone. If there is somebody inside the invisibility is broken. If there is somebody outside the bush he can attack him from invisibility. The spell doesn't make you unable to attack, it just breaks invisibility when you do...

I am starting to think that I am the only one who played league of legends around here >.<

In league when you attack from the bushes you become visible. This works the same way. You are invisible while you chill in the bushes. However, casting a spell in league doesn't break the bush-visibility which is a valid problem in this case.
 
Bot you guys forgot to put the true sight ability like the human towers that is the thing that will help to fight in the bushes i want that two of this abilitys be in my region like a buff or like a aura in the entire region

P.s. i am a pro with lol but we all know that is impossible to make the bushes like in lol or if it is possible then we would need it a special true sight ability for a special invisible ability
 

Chaosy

Tutorial Reviewer
Level 41
Joined
Jun 9, 2011
Messages
13,239
The unit can fight inside the bush. If there nobody in the bush he can't fight anyone. If there is somebody inside the invisibility is broken. If there is somebody outside the bush he can attack him from invisibility. The spell doesn't make you unable to attack, it just breaks invisibility when you do...

I am highly aware of how the bushes work in LoL.

I was thinking about if there are more than two teams. Then your solution wont work. Because if player A and B fight in the bush, both of them will be visible for player C who stands outside. If the bush system is for an arena map, this is quite critical.

AOE dispel abilities will cancel the bush's function permanently unless the unit leaves>enters the bush.
 
They are just two teams but nobody has share vision in the teams,i need this trigger for my map cannibal feed and i plan to use ashenvell bushes and i have say two abilitys "true sight" and "invisible." ability so with "true sight" that gives the unit in the bush the buff to see the invisible units so i didn't think that i will have problems with the fight in the bushes.
 
Status
Not open for further replies.
Top