Are scripts functioning yet?
#2
I use Lua for the scripting. You can type in the command bar, or use Edit>Insert Script to add a script, double click to edit it, then right click>Run Script to test it.

Events don't work yet, but you can do a lot of simple things.

Code:
p =  create("Box"); p. Size = Vec2D(10, 10); p.Position = game.Camera.Position; p.Parent = game.World
[/code]
Code:
while true do game.World.Ground.Color = Color(math.random(0, 255), math.random(0, 255), math.random(0, 255)); sleep(1); end

Code:
step = 0.5
while true do
game.Camera.ScaleFactor = game.Camera.ScaleFactor + step
if game.Camera.ScaleFactor > 16 then
step = -0.5
end
if game.Camera.ScaleFactor < 1 then
step = 0.5
end
sleep(0.05)
end

Code:
game.TaskScheduler:schedule(function() --This makes sure the simulation won't step in the middle of the script
p1 = create("Box")
p1.Position = game.Camera.Position
p1.Parent = game.World

p2 = create("Box")
p2.Position = Vec2D(game.Camera.Position.x, game.Camera.Position.y + 2)
p2.Parent = game.World

w = create("Hinge")
w.Part1 = p1
w.Part2 = p2
w.Anchor = game.Camera.Position
w.Parent = game.JointsService
end)
Reply


Messages In This Thread
Are scripts functioning yet? - by Intile - 10-11-2010, 06:48 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)