-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSharedHiddenZones.lua
More file actions
18 lines (16 loc) · 881 Bytes
/
SharedHiddenZones.lua
File metadata and controls
18 lines (16 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--If you want items to be visible regardless of these scripted hidden zones, give them the tag 'AlwaysVisible'. This does not apply to vanilla hidden zones, however.
--Remove the colours you want to able to see through the hidden zone.
players = {"White","Brown","Red","Orange","Yellow","Green","Teal","Blue","Purple","Pink","Grey"}
zoneGUID = "a8cf04"
function onObjectEnterScriptingZone(zone, obj) --Object enters scripted zone
if zone.getGUID() == zoneGUID then
if obj.hasTag("AlwaysVisible") == false then --Does obj not have AlwaysVisible tag
obj.setInvisibleTo(players) --Make invisible to 'players' when entering
end
end
end
function onObjectLeaveScriptingZone(zone, obj) --Object leaves scripted zone
if zone.getGUID() == zoneGUID then
obj.setInvisibleTo({}) --Make not invisible to 'players' when leaving
end
end