How to make Roshpit vision field?

edited June 2016 in Questions

Is it possible to reproduce a Roshpit like vision field? You can't look in side or look through it, but you can walk through it. I'm trying to make a skill that creat these mini roshpit vision area.

Comments

  • edited June 2016 Posts: 108

    Read this: https://developer.valvesoftware.com/wiki/Dota_2_Workshop_Tools/Level_Design/Creating_A_Dota-Style_Map#Roshan

    You will need a script that creates ent_fow_blocker_node around the ability target.

    Github: Profile Steam: Profile

  • Posts: 6

    Thank you for the help. Trying it out now, definitely looks like what I'm looking for!~

  • Posts: 6

    Apparently "ent_fow_blocker_node" appears to work only after complete build, with careful placement of the node in grid. I'm using Entities:CreateByClassname("ent_fow_blocker_node") in lua script to create the node. And it's not working... Is there a way to place "ent_fow_blocker_node" onto the map with a skill??

  • Posts: 108

    Ahh didn't know they wouldn't work after compiling. You can try place point_simple_obstruction instead. Those work for sure, but they block vision aswell as movement (2x2 square), so i am not sure you will be able to use them.

    Github: Profile Steam: Profile

  • Posts: 6

    Thanks again mate. I searched around the forum for it and got to this thread Square collision using building helper. Played around with it and got it to work creating the point_simple_obstruction. However, now it only blocks movement but not vision!~ SetEnabled doesn't seem to affect vision.

    function smoke(keys)
        local ability = keys.ability
        local point = ability:GetCursorPosition() + Vector(0 , 0 , 129)
        local gridNavBlocker = SpawnEntityFromTableSynchronous("point_simple_obstruction", {origin = point})
        ability.blocker = gridNavBlocker
        ability.blocker:SetEnabled(true, true)
    end
    
  • Posts: 108

    That's weird if you spawn a point_simple_obstruction via hammer, you will notice that it has a key called "BlockFOW" (or something like that), maybe thats not activated by default if you spawn it in via lua. So try enabling that key with the Entity I/O via lua.

    Github: Profile Steam: Profile