added delay for locking helpers
This commit is contained in:
parent
044b3a06e2
commit
dee13c5d26
@ -907,9 +907,7 @@ end
|
|||||||
function spawnOrRemoveHelper(state, name, position, rotation)
|
function spawnOrRemoveHelper(state, name, position, rotation)
|
||||||
if state then
|
if state then
|
||||||
Player.getPlayers()[1].pingTable(position)
|
Player.getPlayers()[1].pingTable(position)
|
||||||
local spawnedHelper = spawnHelperObject(name, position, rotation)
|
return spawnHelperObject(name, position, rotation).getGUID()
|
||||||
spawnedHelper.setLock(true)
|
|
||||||
return spawnedHelper.getGUID()
|
|
||||||
else
|
else
|
||||||
return removeHelperObject(name)
|
return removeHelperObject(name)
|
||||||
end
|
end
|
||||||
@ -937,6 +935,9 @@ function spawnHelperObject(name, position, rotation)
|
|||||||
for _, obj in ipairs(sourceBag.getData().ContainedObjects) do
|
for _, obj in ipairs(sourceBag.getData().ContainedObjects) do
|
||||||
if obj["Nickname"] == name then
|
if obj["Nickname"] == name then
|
||||||
spawnTable.data = obj
|
spawnTable.data = obj
|
||||||
|
spawnTable.callback_function = function(spawnedObj)
|
||||||
|
Wait.time(function() spawnedObj.setLock(true) end, 1)
|
||||||
|
end
|
||||||
return spawnObjectData(spawnTable)
|
return spawnObjectData(spawnTable)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user