2DWorlds Forums
Put this Script into your Body, Fall from a Large Height, and your Camera will SHAKE! - Printable Version

+- 2DWorlds Forums (http://2dworlds.buildism.net/forum)
+-- Forum: 2DWorlds (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=4)
+--- Forum: 2DWorlds Discussion (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=10)
+--- Thread: Put this Script into your Body, Fall from a Large Height, and your Camera will SHAKE! (/showthread.php?tid=6385)



Put this Script into your Body, Fall from a Large Height, and your Camera will SHAKE! - DoubleRainbow - 07-01-2011

[lua]function shakeCamera()
i = 1
while i > 0 do
local vec = Vec2D(math.random(1, 3), math.random(1, 3)):mul(Vec2D(i, i))
local rotation = math.random(-4, 4) * i
if math.random() > 0.5 then
vec = vec:mul(Vec2D(-1, -1))
end
game.CurrentCamera.Offset = vec
game.CurrentCamera.RotationOffset = rotation
i = i - 0.25
sleep(0.02)
end
game.CurrentCamera.Offset = Vec2D(0, 0)
game.CurrentCamera.RotationOffset = 0
end
link(script.Parent.Collided, function(part, velocity) if math.abs(velocity.y) > 20 then shakeCamera() end end)
[/lua]

This was Added to the Client, and Stuff, but I showed it off, anyways. ^_^


RE: Put this Script into your Body, Fall from a Large Height, and your Camera will SHAKE! - Spongebob1212 - 07-01-2011

*facepalm* WHO ARE YOU.