STRETCH TOOL
Game based on vertexes. Has scale tool which works fine, but not stretching along one plane/axis. something is wrong here
viewtopic.php?f=33&p=21002#p21002
-- Scale Tool for X plane
-- Authored by Thomas of Hilo
-- Based on works by Kaen, raptor, Watusimoto
function getArgsMenu()
menu = {
TextEntryMenuItem.new("Scale X: ", "1", "10.0", "I don't know what's going on here"),
TextEntryMenuItem.new("Scale Y: ", "1", "10.0", "Woo hoo"),
}
return "XYScaler", "Scale selection on the X or Y axis", "Ctrl+=", menu
end
function main()
local objects = plugin:getSelectedObjects()
if #objects == 0 then
plugin:showMessage("Operation failed. No objects are selected", false)
return
end
end
-- Scale Tool for X plane
-- Authored by Thomas of Hilo
-- Based on works by Kaen, raptor, Watusimoto
function getArgsMenu()
menu = {
TextEntryMenuItem.new("Scale X: ", "1", "10.0", "I don't know what's going on here"),
TextEntryMenuItem.new("Scale Y: ", "1", "10.0", "Woo hoo"),
}
return "XYScaler", "Scale selection on the X Y axis", "Ctrl+=", menu
end
function main()
local sx = table.remove(arg, 1)
local sy = table.remove(arg, 2)
local objects = plugin:getSelectedObjects()
if #objects == 0 then
plugin:showMessage("Operation failed. No objects are selected", false)
return
else
end
end
-- Scale Tool for X plane
-- Authored by Thomas of Hilo
-- Based on works by Kaen, raptor, Watusimoto
function getArgsMenu()
menu = {
TextEntryMenuItem.new("Scale X: ", "1", "10.0", "I don't know what's going on here"),
TextEntryMenuItem.new("Scale Y: ", "1", "10.0", "Woo hoo")
}
return "XYScaler", "Scale selection on the X Y axis", "Ctrl+=", menu
end
function main()
local sx = table.remove(arg, 1)
local sy = table.remove(arg, 1)
local objects = plugin:getSelectedObjects()
if #objects == 0 then
plugin:showMessage("Operation failed. No objects are selected", false)
return
else
for _, obj in pairs(objects) do
local typeId = obj:getObjType()
local geom = obj:getGeom()
local team = obj:getTeamIndex()
local result = Geom.scale(geom, sx, sy)
--[[ the following two lines outside brackets do not work.
I need to table.insert?
And object is global, i need a local object
]]--
object:setGeom(geom)
bf:addItem(object)
end
end
end
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
Users browsing this forum: No registered users and 31 guests