• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Help w/ Tall Grass

Status
Not open for further replies.

sentrywiz

S

sentrywiz

I'm not sure who first coined the use of tall brush, grass. I think I saw the first use in League of Legends although I'm sure there are uses before that. When you enter the brush, you are in stealth to everyone outside the brush until you cast a spell, get out or attack. If wait for 3-4 seconds after an action is performed, you again are entering stealth mode. If anyone else enters the brush, they can see you.

So my question is:

How to make that?

1. I think you make a couple of regions, put doodads of Shrubs at them and call that the brush.

2. Make a trigger about "When unit enters region", then you create dummy to cast Invisibility on that unit.

3. If a unit leaves the region, you remove the invisibility buff from them.

4. Need help here. How to make the stealthed units visible to units inside the brush? Note that both units are stealthed and not being seen outside the brush but they can see themselves.

5. Need help here. How to make units that performed an action but remained inside the brush (region) for 3-4 second again go stealth?


Thanks!
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
I'm not sure who first coined the use of tall brush, grass. I think I saw the first use in League of Legends although I'm sure there are uses before that. When you enter the brush, you are in stealth to everyone outside the brush until you cast a spell, get out or attack. If wait for 3-4 seconds after an action is performed, you again are entering stealth mode. If anyone else enters the brush, they can see you.

So my question is:

How to make that?

1. I think you make a couple of regions, put doodads of Shrubs at them and call that the brush.

2. Make a trigger about "When unit enters region", then you create dummy to cast Invisibility on that unit.

3. If a unit leaves the region, you remove the invisibility buff from them.

4. Need help here. How to make the stealthed units visible to units inside the brush? Note that both units are stealthed and not being seen outside the brush but they can see themselves.

5. Need help here. How to make units that performed an action but remained inside the brush (region) for 3-4 second again go stealth?


Thanks!

i think useless to make it since i dont know good slolution what dont slowdown the map if u have alot grass.

1. better make unit, change scale make collision to 0 and food cost 0, add locust ability and make a trigger what check every 0.1 sec if have x unit type around u with pick unit group around ur position anf mathing unit type is grass

2. region work better but problem with it then u must do with square or rectangle formation ur grass, what is unrealistic

3. dont need dummy unit for it, just dummy wind walk with damn huge time, when u enter to region then add windwalk, order it (action->unit->order with no target) and when u leave the region remove the ability

4. idk, maybe with ally shared vision

5. idk
 

sentrywiz

S

sentrywiz

i think useless to make it since i dont know good slolution what dont slowdown the map if u have alot grass.

Don't understand what you mean.

1. better make unit, change scale make collision to 0 and food cost 0, add locust ability and make a trigger what check every 0.1 sec if have x unit type around u with pick unit group around ur position anf mathing unit type is grass

2. region work better but problem with it then u must do with square or rectangle formation ur grass, what is unrealistic

3. dont need dummy unit for it, just dummy wind walk with damn huge time, when u enter to region then add windwalk, order it (action->unit->order with no target) and when u leave the region remove the ability

Well your suggestions aren't helping me, they just add unnecessary complexity, both object and trigger-wise. I can get away with one dummy unit, one spell and one trigger with my idea. Your idea, I need one big trigger that will constantly lag every 0.10 seconds or even worse, 0.01 seconds and burn computer ram like nuts. That with more people will cause lots of lag and a possible crash.

I will make a rectangle and add random grass in it. That isn't unrealistic

But why windwalk when I need to first add it to the unit the user is controlling, disrupting gameplay and make that unit cast it when I can make a dummy that can target the unit and cast it without the player knowing it. This doesn't make sense.

4. idk, maybe with ally shared vision

5. idk

Well you basically told me stuff I already knew in much greater work and with more leaks and bugs than mine and didn't help me in stuff I didn't knew. Sorry but why did you reply at all?

Instead of cast invisibility, use add and remove permanent invisibility to hiding unit.

That might work, but will it work for attack and spell cast?
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
Don't understand what you mean.



Well your suggestions aren't helping me, they just add unnecessary complexity, both object and trigger-wise. I can get away with one dummy unit, one spell and one trigger with my idea. Your idea, I need one big trigger that will constantly lag every 0.10 seconds or even worse, 0.01 seconds and burn computer ram like nuts. That with more people will cause lots of lag and a possible crash.

I will make a rectangle and add random grass in it. That isn't unrealistic

But why windwalk when I need to first add it to the unit the user is controlling, disrupting gameplay and make that unit cast it when I can make a dummy that can target the unit and cast it without the player knowing it. This doesn't make sense.



Well you basically told me stuff I already knew in much greater work and with more leaks and bugs than mine and didn't help me in stuff I didn't knew. Sorry but why did you reply at all?



That might work, but will it work for attack and spell cast?

1. if u think unecesary complexity then try it and u will see not that easy than u think :p
also dont need dummy so weird why more complex.

2. lagg come from action in periodic trigger, coz let me guess u want hide more than 1-2 unit, so what happen if have 100-200 unit on map and u pick all unit and do action with same then 2 unit?

3. u make 100 small rectangle so 200+ or 200+ event with leave and enter? else if u do a smaller rectangle will be weird when u enter to region but still not in grass and u are invisible

4. windwalk dont interrupt the unit order also u could make it invisble ability with spellbook (in spellbook u add windwalk in object editor, add spell book in game via trigger and disable=>no icon at all, dont interrupt unit urder, and still wind walk usefull)
Player can know if he get a invisble ability what is also dont interupt to order and dont got aura buff also in less time then make dummy unit, add ability to him, and order him?

5. windwalk automatically interupted when u attack but anyway u can do a event too when if attacker have windwalk buff then remove it without removeing the ability, so if u put windwalk cooldown to 0 sec, mana cost to 0 then u can cast again when u want via trigger
 
Level 11
Joined
Nov 15, 2007
Messages
781
Create a dummy unit with 200 day/night vision and 200 AoE true sight. Whenever a unit enters the brush, create one of these units on every enemy unit in the same brush. Every .05 seconds, if the unit's position is still within the brush region, move the dummy to the position of its target, otherwise remove it.

For the 4 second fade effect you can do the same thing. When a unit is damaged by a unit in brush, remove all visibility dummies owned by the owner of the damaged unit and create a new visibility dummy on the damaging unit. When a visibility dummy dies, re-cast invisibility on the target; it will remain visible for units in the brush or units it has damaged within 4 seconds.

You'll need basic knowledge of hash tables and/or unit indexing, and a damage detection system for this.

http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/hashtables-mui-133407/

http://www.hiveworkshop.com/forums/spells-569/gui-damage-engine-201016/
 
Level 10
Joined
May 28, 2011
Messages
455
but in lol if u was hided and hit from bush then u are visible for a short time

Then add the duration to 3 - 4 seconds. if entering bush directly gives you invi. order issue unit to cast invi and add the unit permanent invi ability.

If anyone else enters the brush, they can see you
Add truesight ability.

When you enter the brush, you are in stealth to everyone outside the brush until you cast a spell, get out or attack.

Any action that is not related to attacking and casting spell which will break the permanent invi, just trigger remove the ability. i guess the only left is get out.

Check every interval that the hiding unit is no longer in bush, remove his permanent invi, invi buff if the unit had one and truesight.

Checking can be in many ways such as check distance between unit and bush or is unit is in region.
 
Level 11
Joined
Nov 15, 2007
Messages
781
Add truesight ability.

Problem: This allows you to see any stealth units within range of true sight, including units in a different patch of brush or units using their own stealth abilities (also a problem with the method I described earlier, but to a lesser degree as the reveal radius is only 200).
 

sentrywiz

S

sentrywiz

Thanks for all your responses so far, however I don't see a very viable solution that is both not time-consuming or asking me to learn or implement new systems. I think the complete trigger would look something like this:

1 - Unit enters Brush_Region (Make dummy, cast invisibility, add stealth detection passive with the name "In Brush" and with a short description. Set the radius of truesight spell to 150-200 units of range.

2 - Unit starts the effect or ability (Unit is in Brush_Region, remove buff, launch a global timer Timer[Player number of owner of triggering unit] that will end in 3 seconds. Create variable boolean In_Combat=true)

3 - Unit is attacked (same thing as the above only for attack)

4 - Timer[Player number of owner of triggering unit] ends. If In_Combat=true then do nothing, else set In_Combat=false and create a dummy, cast invisibility again

5 - Unit leaves Brush_Region (Remove both buff and truesight ability)



Comments on the above?
 
Level 10
Joined
May 28, 2011
Messages
455
Problem: This allows you to see any stealth units within range of true sight, including units in a different patch of brush or units using their own stealth abilities (also a problem with the method I described earlier, but to a lesser degree as the reveal radius is only 200).

ooo.. i dont know that the unit in bush can only detect other unit in bush. not the invi units.

I dont think there is any solution to detect stealth unit other than truesight ability.

Comments on the above?

The algorithm is good enough. I like permanent invi more coz it already do 1, 2, 3 and 4.
 
Level 17
Joined
Apr 3, 2010
Messages
1,101
Can't you just do use an aura then check for buffs? thus avoiding regions?


For the truesight thing. Either make bush's further distance. Or use a hide system so you hide the unit from other players completly. Allthough may bug as in Aoe spell swon't affect them.

Alternatively

Keep with regionis and create visibillity modifiers.


Or use the aura thing. Then create a dummy unit with a 50 range truesight ontop of the enemy units in brush. So others in bush can see.


I would just use Aura and a perma invis true sight + Black mask / visibillity modifiers. But yeh
 
Level 11
Joined
Nov 15, 2007
Messages
781
Can't you just do use an aura then check for buffs? thus avoiding regions?

Auras last several seconds after you leave their range.


For the truesight thing. Either make bush's further distance. Or use a hide system so you hide the unit from other players completly. Allthough may bug as in Aoe spell swon't affect them.

Hidden units can't be selected and thus you cannot issue them orders, and lots of other problems.

Alternatively

Keep with regionis and create visibillity modifiers.

This is another good point - if you want brush to block vision of units behind brush unless you're inside the brush, like it does in LoL, you'll need some kind of visibility modifier.

Actually, if visibility modifiers can be created locally without causing a server split, you might even be able to use them and not need to stealth units in brush at all. I can't comment on whether visibility modifiers can be used locally though, hopefully someone with better knowledge of that kind of thing shows up.


Or use the aura thing. Then create a dummy unit with a 50 range truesight ontop of the enemy units in brush. So others in bush can see.

This is still the solution I would recommend because it's the only one that wouldn't conflict with normally-stealthed units (outside of using visibility modifiers). You wouldn't reveal them unless they were directly on top of the revealed unit. Any other solution involving longer range true sight or vision sharing will have repercussions.
 
Level 17
Joined
Apr 3, 2010
Messages
1,101
maybe just spam the vision blockers -- Doodad. in the bush that way you see your unit and nothing around you.

if local is bad.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
maybe just spam the vision blockers -- Doodad. in the bush that way you see your unit and nothing around you.

if local is bad.

But he should see everything around him including the invisible unit but only locally for the player that owns the unit.
I have tried doing this for a game of stratego a long time ago. But using local player to show the visibility of a unit causes a desync.
I'm not sure about visibility modifiers though, I haven't tested that. It might work though..
 
Level 17
Joined
Apr 3, 2010
Messages
1,101
Doodad would just block everything around him =D . but modifiers might work :L or create a vision blocker which blocks everyone from seeing into the bush but not out =D
 
Level 11
Joined
Nov 15, 2007
Messages
781
Doodad would just block everything around him =D . but modifiers might work :L or create a vision blocker which blocks everyone from seeing into the bush but not out =D

The point is to be able to see out of the brush, but not be seen by enemies outside of it, so vision blockers wouldn't work as they're two-way.
 

sentrywiz

S

sentrywiz

Like all of you said, this is a difficult thing to manage.
Not sure how other people did it, I have seen it in some maps... but don't remember if it was fully functional like in LoL or just half way.

Anyway thanks for the large discussion. Its crap that still no viable solution lol
 

sentrywiz

S

sentrywiz

How did they do it for the Dota spell "spin web"?

I haven't been playing dota since idk when. Possibly 4-5 versions before so I don't really know that spell. I do know a couple of maps that had something like that system implemented:

- Ninja Wars (or something like that, where you can hide in a brush)

I still think the solution is half-assed. There is no viable solution to the problem, because there are no brush-blockers. In Starcraft 2 Galaxy Editor, there is simply a doodad with the full system implemented. Units in brush cannot be seen outside, they see inside and outside of brush and can attack whoever they please. If they don't attack, outside units need to enter brush to see, and thus attack them.


The most I've reached was with what I wrote before - a region, unit enters region, gets stealth and a stealth detection. If he leaves region, he loses both. If another unit gets in, he gets them both and can see roughly 200 units of range and thus see the other stealthed units.

Problems with the system is:

-there is no brush-stealth and stealth-stealth so the brush kinda abuses the mechanic if you have stealth hero, if he enters a brush he can be seen by enemies even if they don't have (example True Sight or an item that gives True Sight)

-if two stealthed units start a fight in the brush, they will unstealth and cannot restealth unless they leave and enter the brush again. Which kinda sucks in example:

Example: I attack, losing stealth. You attack, losing stealth too but you quickly leave and come back, gain stealth again but I can still see you, even when I am not stealthed. And if I make the triggers that I should also lose the true sight when I start an attack, in that case you would be able to see me, and I wouldn't.


This is just one of many such bugged cases. For now I can't say there is a viable GUI-based solution. Not sure for jass or vjass you tell me.
 

sentrywiz

S

sentrywiz

I'm gonna be making a region-brush-stealth in my future map to be finished. Of course, I won't make a stealth hero and since the map is a retarded version of pudge wars, no attacks either.

However problems with brush-fights will trigger lot of bugs:

- brush stealth will trigger upon entry in brush and not after you shot a missile from a brush. Only thing that crosses my mind is to check when the unit casts a spell from a brush and is not in stealth, give it stealth again. However, this is just prototype thought will know more when I have tested it

- brush regions must be square. unfortunately this kills round brushes, diagonal brushes or even part horizontal part vertical brush. This means I need to plan for only a square brush

- brush needs to be visually seen as a brush and visually not leave any extra space. If this confuses you, it means that brushes are usually well drawn tall grass in other games. You can see the visuals quite good and when you enter it, you see yourself as a shaded version in the brush but still see the brush as a cool drawn tall grass. In warcraft, this would be simulated with only a custom large corn field, brush, bush or even flowers. Kinda doesn't look the same, but better some than none

- missiles must trigger stealth to break. but since there is no damage event, I'd have to put a check in every deal damage trigger to see if the unit is in the brush, if so, remove the stealth buff
 

sentrywiz

S

sentrywiz

you can simply change vertex coloring to 0 0 0 this will make the hero almost invisible if there are a lot of bushes it is impossible to see the unit this is the easiest way i think

Casting Invisibility on entering unit will do that for me.
 
Status
Not open for further replies.
Top