Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
if message == "#luosetti" and sender.host then
local selobjs=sender.getSelectedObjects()
if #selobjs > 0 then
local spawnpos=selobjs[#selobjs].getPosition()
local spawnrot=selobjs[#selobjs].getRotation()
local tmpdesc=selobjs[#selobjs].getDescription()
local list={}
for i=1, #selobjs-1 do
table.insert(list,selobjs[i].getData())
end
local txtdata=JSON.encode(list)
local tmpobjdata={}
tmpobjdata.Name= "BlockSquare"
tmpobjdata.Description="save"
tmpobjdata.Memo=txtdata
tmpobjdata.Transform={}
tmpobjdata.Transform.posX=spawnpos.x
tmpobjdata.Transform.posY=spawnpos.y
tmpobjdata.Transform.posZ=spawnpos.z
tmpobjdata.Transform.rotX=spawnrot.x
tmpobjdata.Transform.rotY=spawnrot.y
tmpobjdata.Transform.rotZ=spawnrot.z
tmpobjdata.Transform.scaleX=1
tmpobjdata.Transform.scaleY=1
tmpobjdata.Transform.scaleZ=1
tmpobjdata.LuaScript="function onLoad() self.addContextMenuItem('Lataa', function() local list=JSON.decode(self.memo); for i=1,#list do spawnObjectData({data=list[i], position=self.positionToWorld(Vector(list[i].Transform.posX,list[i].Transform.posY,list[i].Transform.posZ)), rotation=Vector(list[i].Transform.rotX+self.getRotation().x,list[i].Transform.rotY+self.getRotation().y,list[i].Transform.rotZ+self.getRotation().z), }); end self.destruct(); end ) end"
spawnObjectData({data=tmpobjdata})
end
end
end
1. spawn redcube
2. select restof objects
3. select cube spawned
4. ---
or
2. select all
3. deselect redcube
4. reselect redcube
5.type to chat #luosetti
things to remember
-leave red cube before command at 0 rotation
-when u use red cube to load objects, leave red cube 0 rotation.
-if u want to rotate objects then when u load rotate accordingly.