how to make brush system in league of legend?

dansam92

New Member
Reaction score
1
i wanna make brush system like lol's.
i think about using region.
when an unit entering the brush region, then turn it invisible by using local player func. (is it available?)
and the unit doing some actions like attack (except moving)
then it will turn into visible again.
and when two units stand close together, they can see each other. unless they r not allied.

i want to see ur fabulous idea about this before making this system.:)

more specific:
http://www.leagueoflegends.com/learn/new_user_guide#brush

sorry im not good at eng... if i have some mistake, let me know.
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
It's almost impossible to do it in the way you describe it.

The closest way i can think of, is if a unit enters a region, it would gain wind walk in a hidden spellbook, and be ordered to cast it (since it doesn't remove the current orders). When the unit exits the region, remove the buff and the ability from the unit. However, this would not work if two players are near, but it's the closest thing you can do.
 

dansam92

New Member
Reaction score
1
It's almost impossible to do it in the way you describe it.

The closest way i can think of, is if a unit enters a region, it would gain wind walk in a hidden spellbook, and be ordered to cast it (since it doesn't remove the current orders). When the unit exits the region, remove the buff and the ability from the unit. However, this would not work if two players are near, but it's the closest thing you can do.

thx for ur advice.
maybe its impossible to make what i originally thought...
 

Viikuna

No Marlo no game.
Reaction score
265
Off Topic: Makes me sick to see this "From The Creators of DotA Allstarts" -Bullshit.

Its map stealers like Guinsoon and IceFrog who get the profit, and noone remembers the guy who actually made the fucking map.



On Topic: Its not impossible at all. You just play with ghost ability and use some true sight dummies for detection.

Edit. Actually, you need to use UnitShareVision, to make only one player to see that guy, but that also gives you the sight range of target unit. That can ofc to be solved by making all units have a small sight range (so they only see themselves ), and use some constantly moving sight range dummies to give them the real sight.

In other words: You create a custom sight range system for your map. Its not a bad idea, since you can use it for other cool stuff too.
You cant really do that for too many units, though, so its only viable for maps with not too many units.
 

Bird

Ultra Cool Member
Reaction score
29
I have been playing League of Legends for like 9 weeks now... it is not possible, at least not the way they do it.

In LoL you go 'invisible' in the brush, but only to those *outside* of the brush. An enemy inside of the brush can see you.

So perhaps what you want to do, is simply stack up Line of Sight Blockers around your 'brush' area, so no one can see into it - but this has the problem that no one *in* the bush can see *out* of the bush, and vice versa.

Another idea - give everyone that goes into the brush Invisibility, and True Sight. That way, everyone in the brush can see everyone in the brush, as intended. BUT, if anyone actually is invisible (via Wind Walk or *real* Invisibility) they can be seen too.

So yea... these are some partial solutions.
 

dansam92

New Member
Reaction score
1
Off Topic: Makes me sick to see this "From The Creators of DotA Allstarts" -Bullshit.

Its map stealers like Guinsoon and IceFrog who get the profit, and noone remembers the guy who actually made the fucking map.



On Topic: Its not impossible at all. You just play with ghost ability and use some true sight dummies for detection.

Edit. Actually, you need to use UnitShareVision, to make only one player to see that guy, but that also gives you the sight range of target unit. That can ofc to be solved by making all units have a small sight range (so they only see themselves ), and use some constantly moving sight range dummies to give them the real sight.

In other words: You create a custom sight range system for your map. Its not a bad idea, since you can use it for other cool stuff too.
You cant really do that for too many units, though, so its only viable for maps with not too many units.

i didn't mention about using UnitShareVision function.
actually, i had no idea there is such a function.
thanks for ur comment. it would be a big help.
 

dansam92

New Member
Reaction score
1
oh... i've never played lol before.
i just see it through youtube video clip.
thanks a lot. it is little bit differ with what i thought before.
 

13lade619

is now a game developer :)
Reaction score
398
So perhaps what you want to do, is simply stack up Line of Sight Blockers around your 'brush' area, so no one can see into it - but this has the problem that no one *in* the bush can see *out* of the bush, and vice versa.
^that is precisely the problem i solved using some sort of dummy units to share vision with, outside the brush.
 

dansam92

New Member
Reaction score
1
awesome. i'll play ur map. i'm dying to know how did u made it. :)

edit*
i made it in my own way yesterday.
but i'm not sure about mine is better than what u mentioned above.
first, i made brush into destructible object.
i arranged them in proper positions.
then i made a rect around whole brushes. (with GetEnumDestructible func)
and merge them into one region. and destroy whole brush rect merged into new region.
i made unit invisible/visible when they enter/leave the region by giving them ghost ability.
and periodically select whole units in the brush region(i made a group to control them with ease) and check there is no enemy unit around each unit.
if there is an enemy unit around it, remove invi ability to let them see each other.
and when the distance between one and its enemy unit is too far, unit turns into invisible again if it is still on the brush region.
it works well but if there is too many units in brush region, it is too laggy.
and unit with detect ability can see whole units in brush.
what do u think about my own way?
 

overload119

New Member
Reaction score
5
Alright but it was from a map I made a while ago.

Not sure if it's what you want but it pretty much worked like what you said.

JASS:
function Trig_Reveal_Terrain_Cover_Actions takes nothing returns nothing
    local unit tempUnit
    local unit u = GetTriggerUnit()
    local integer i = 0
    local real x1
    local real y1
    local real x2 = GetUnitX( u )
    local real y2 = GetUnitY( u )
    loop
    exitwhen i >= udg_HidingUnitsIndex
        // call BJDebugMsg(&quot;Checking...&quot; + GetUnitName(udg_HidingUnits<i>))
        set tempUnit = udg_HidingUnits<i>
        set x1 = GetUnitX( tempUnit )
        set y1 = GetUnitY( tempUnit )
        // call BJDebugMsg(R2S(DistanceBetweenXY( x1, y1, x2, y2)))
        if( DistanceBetweenXY(x1, y1, x2, y2) &lt; 150 and IsUnitEnemy( u, GetOwningPlayer(tempUnit)) and IsUnitType(u, UNIT_TYPE_HERO) ) then            
            // call BJDebugMsg(&quot;Revealing: &quot;+GetUnitName(tempUnit))
            call UnitRemoveAbility( tempUnit, &#039;Binv&#039; )
        endif
        set i = i+1
    endloop
endfunction

//===========================================================================
function InitTrig_Reveal_Terrain_Cover takes nothing returns nothing
    set gg_trg_Reveal_Terrain_Cover = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Reveal_Terrain_Cover, function Trig_Reveal_Terrain_Cover_Actions )
endfunction</i></i>




JASS:
function Trig_Break_Terrain_Cover_Actions takes nothing returns nothing
    call UnitRemoveAbility( GetTriggerUnit(), &#039;Binv&#039; )
endfunction

//===========================================================================
function InitTrig_Break_Terrain_Cover takes nothing returns nothing
    set gg_trg_Break_Terrain_Cover = CreateTrigger(  )
    call TriggerRegisterLeaveRectSimple( gg_trg_Break_Terrain_Cover, gg_rct_Grassy_Area )
    call TriggerAddAction( gg_trg_Break_Terrain_Cover, function Trig_Break_Terrain_Cover_Actions )
endfunction


JASS:
function Trig_Terrain_Cover_Condition takes nothing returns boolean
    return IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO)
endfunction

function Trig_Terrain_Cover_Actions takes nothing returns nothing    
    local unit u = GetTriggerUnit()    
    local integer pId = GetPlayerId( GetOwningPlayer(u) )
    local boolean indexed = false
    local integer i = 0    
    local unit d = CreateUnit( GetOwningPlayer(u), &#039;h002&#039;, GetUnitX(u), GetUnitY(u), 0 )
    
    loop
    exitwhen i &gt; 11
        if( udg_HidingUnits<i> == u ) then
            set indexed = true
        endif
        set i = i+1
    endloop
    
    if( indexed == false ) then
        set udg_HidingUnits[udg_HidingUnitsIndex] = u
        set udg_HidingUnitsIndex = udg_HidingUnitsIndex + 1
    endif
    
    call UnitAddAbility( d, &#039;A001&#039; )
    call IssueTargetOrder(d, &quot;invisibility&quot;, u)
    call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1 )
    call TriggerRegisterUnitInRange(gg_trg_Reveal_Terrain_Cover, u, 128, null)
endfunction

//===========================================================================
function InitTrig_Terrain_Cover takes nothing returns nothing
    set gg_trg_Terrain_Cover = CreateTrigger(  )
    call TriggerRegisterEnterRectSimple( gg_trg_Terrain_Cover, gg_rct_Grassy_Area )
    call TriggerAddCondition( gg_trg_Terrain_Cover, Condition(function Trig_Terrain_Cover_Condition) )
    call TriggerAddAction( gg_trg_Terrain_Cover, function Trig_Terrain_Cover_Actions )
endfunction</i>
 

Bird

Ultra Cool Member
Reaction score
29
^ Well this involves adding the Invisibility ability to the units, so it will not work even close to how LoL works.

But I thought of a much more practical way to do it.

What in WC3 would simulate the brushes in LoL? A cliff.

A unit on a cliff can see the units off (lower than) the cliff, and units off the cliff cannot see units on the cliff. So you would need to add a cliff, and a ramp all around the cliff, so that the cliff can be accessed seamlessly (hopefully) and then reduce the height of the cliffed area, so that, visually, it does not appear to be a cliff.

This would work exactly like a LoL brush.
 

BlueMirage

Trust, but doubt.
Reaction score
39
Bird's solution should be possible. Cliffs can have ramps on all sides, and should hopefully be able to get lowered enough.
Tried making a cliff with ramps on all sides, then lower the thing. It was somewhat tedious to get it to work, but it didn't look too bad. Shouldn't look bad at all if there's grass and stuff over it.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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