This shall be my first script...
#4
That's one big link statement, I don't think it's supposed to be like that.
Let me try.


[lua]local deb = false
function onCollide(hit)
if hit.Name == "Body" and deb == false then
deb = true
game.World.Button1.Color = Color(0,255,0) --green
sleep(1)
deb = false
game.World.Button1.Color = Color(255,0,0) --red
end
end
link(game.World.Button1.Collided, onCollide)[/lua]

I think that's correct.
By the way, you misspelled "deb = false" and wrote "dep = false" towards the end.
Reply


Messages In This Thread
This shall be my first script... - by akiake - 08-13-2011, 01:50 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)