script DEBUG
Browse files- cubzh.json +2 -1
- cubzh.lua +11 -2
cubzh.json
CHANGED
@@ -2,7 +2,8 @@
|
|
2 |
"script": "cubzh.lua",
|
3 |
"env": {
|
4 |
"USER_AUTH": "disabled",
|
5 |
-
"CUBZH_MENU": "disabled"
|
|
|
6 |
},
|
7 |
"contributors": [
|
8 |
{ "caillef": 0.4 },
|
|
|
2 |
"script": "cubzh.lua",
|
3 |
"env": {
|
4 |
"USER_AUTH": "disabled",
|
5 |
+
"CUBZH_MENU": "disabled",
|
6 |
+
"CHAT_CONSOLE_DISPLAY": "always"
|
7 |
},
|
8 |
"contributors": [
|
9 |
{ "caillef": 0.4 },
|
cubzh.lua
CHANGED
@@ -335,6 +335,7 @@ function generateWorld()
|
|
335 |
end
|
336 |
|
337 |
Client.OnWorldObjectLoad = function(obj)
|
|
|
338 |
if obj.Name == "pirate_ship" then
|
339 |
obj.Scale = 1
|
340 |
end
|
@@ -343,19 +344,27 @@ Client.OnWorldObjectLoad = function(obj)
|
|
343 |
gigaxWorldConfig.locations[1].position = pos
|
344 |
gigaxWorldConfig.NPCs[1].position = pos
|
345 |
gigaxWorldConfig.NPCs[1].rotation = obj.Rotation:Copy()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
obj:RemoveFromParent()
|
347 |
elseif obj.Name == "NPC_baker" then
|
348 |
local pos = obj.Position:Copy()
|
349 |
gigaxWorldConfig.locations[2].position = pos
|
350 |
gigaxWorldConfig.NPCs[2].position = pos
|
351 |
gigaxWorldConfig.NPCs[2].rotation = obj.Rotation:Copy()
|
352 |
-
obj:RemoveFromParent()
|
353 |
elseif obj.Name == "NPC_pirate" then
|
354 |
local pos = obj.Position:Copy()
|
355 |
gigaxWorldConfig.locations[3].position = pos
|
356 |
gigaxWorldConfig.NPCs[3].position = pos
|
357 |
gigaxWorldConfig.NPCs[3].rotation = obj.Rotation:Copy()
|
358 |
-
obj:RemoveFromParent()
|
359 |
end
|
360 |
end
|
361 |
|
|
|
335 |
end
|
336 |
|
337 |
Client.OnWorldObjectLoad = function(obj)
|
338 |
+
print("OBJECT DID LOAD:", obj.Name)
|
339 |
if obj.Name == "pirate_ship" then
|
340 |
obj.Scale = 1
|
341 |
end
|
|
|
344 |
gigaxWorldConfig.locations[1].position = pos
|
345 |
gigaxWorldConfig.NPCs[1].position = pos
|
346 |
gigaxWorldConfig.NPCs[1].rotation = obj.Rotation:Copy()
|
347 |
+
|
348 |
+
-- DEBUG: this works, but not avatar loaded with gigax module
|
349 |
+
local test = require("avatar"):get("aduermael")
|
350 |
+
test:SetParent(World)
|
351 |
+
test.Position:Set(obj.Position)
|
352 |
+
test.Rotation:Set(obj.Rotation)
|
353 |
+
test.Scale:Set(obj.Scale)
|
354 |
+
|
355 |
obj:RemoveFromParent()
|
356 |
elseif obj.Name == "NPC_baker" then
|
357 |
local pos = obj.Position:Copy()
|
358 |
gigaxWorldConfig.locations[2].position = pos
|
359 |
gigaxWorldConfig.NPCs[2].position = pos
|
360 |
gigaxWorldConfig.NPCs[2].rotation = obj.Rotation:Copy()
|
361 |
+
-- obj:RemoveFromParent()
|
362 |
elseif obj.Name == "NPC_pirate" then
|
363 |
local pos = obj.Position:Copy()
|
364 |
gigaxWorldConfig.locations[3].position = pos
|
365 |
gigaxWorldConfig.NPCs[3].position = pos
|
366 |
gigaxWorldConfig.NPCs[3].rotation = obj.Rotation:Copy()
|
367 |
+
-- obj:RemoveFromParent()
|
368 |
end
|
369 |
end
|
370 |
|