excluded threat area
This commit is contained in:
parent
2186d5f07e
commit
6a426ff492
@ -5,6 +5,7 @@ local searchLib = require("util/SearchLib")
|
|||||||
exposedValue = 0
|
exposedValue = 0
|
||||||
|
|
||||||
local playmat
|
local playmat
|
||||||
|
local searchParam = {}
|
||||||
|
|
||||||
function onLoad()
|
function onLoad()
|
||||||
self.createButton({
|
self.createButton({
|
||||||
@ -22,6 +23,13 @@ function onLoad()
|
|||||||
local matColor = playmatApi.getMatColorByPosition(self.getPosition())
|
local matColor = playmatApi.getMatColorByPosition(self.getPosition())
|
||||||
playmat = guidReferenceApi.getObjectByOwnerAndType(matColor, "Playermat")
|
playmat = guidReferenceApi.getObjectByOwnerAndType(matColor, "Playermat")
|
||||||
|
|
||||||
|
-- get search parameters (threat area excluded)
|
||||||
|
local localPos = playmat.positionToLocal(playmat.getPosition())
|
||||||
|
searchParam.pos = playmat.positionToWorld(localPos + Vector(0, 0, 0.4))
|
||||||
|
searchParam.rot = playmat.getRotation() + Vector(0, 90, 0)
|
||||||
|
searchParam.size = Vector(8, 1, 27)
|
||||||
|
searchParam.filter = "isClue"
|
||||||
|
|
||||||
-- start loop
|
-- start loop
|
||||||
Wait.time(countItems, 1.5, -1)
|
Wait.time(countItems, 1.5, -1)
|
||||||
end
|
end
|
||||||
@ -43,5 +51,5 @@ function removeAllClues(trash)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function getClues()
|
function getClues()
|
||||||
return searchLib.onObject(playmat, "isClue")
|
return searchLib.inArea(searchParam.pos, searchParam.rot, searchParam.size, searchParam.filter)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user