Spawn clues next to locations instead of on top of them

This commit is contained in:
Adam Goldsmith 2020-11-29 00:09:46 -05:00
parent 9f1f967933
commit b48a171d6f

View File

@ -161,24 +161,11 @@ function spawnCluesAtLocation(clueCount, collision_info)
markSpawned(object)
i = 0
while i < clueCount do
if i < 4 then
obj_parameters.position = {
collision_info.collision_object.getPosition()[1] + 0.3,
collision_info.collision_object.getPosition()[2] + 0.2,
collision_info.collision_object.getPosition()[3] - 0.8 + (0.55 * i)
}
elseif i < 8 then
obj_parameters.position = {
collision_info.collision_object.getPosition()[1] + 0.85,
collision_info.collision_object.getPosition()[2] + 0.2,
collision_info.collision_object.getPosition()[3] - 3 + (0.55 * i)
}
else
obj_parameters.position = {
collision_info.collision_object.getPosition()[1] + 0.575,
collision_info.collision_object.getPosition()[2] + 0.4,
collision_info.collision_object.getPosition()[3] - 5.2 + (0.55 * i)}
end
obj_parameters.position = {
collision_info.collision_object.getPosition()[1] - 1 + (0.55 * (i % 4)),
collision_info.collision_object.getPosition()[2] + 0.2,
collision_info.collision_object.getPosition()[3] - 1.4 - (math.floor(i / 4) * 0.55)
}
spawnToken(obj_parameters.position, '3')
i = i + 1
end