2DWorlds Forums
Tutorial: Removing the character - 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: Tutorial: Removing the character (/showthread.php?tid=1204)



Tutorial: Removing the character - Jacob__mybb_import1 - 01-29-2011

If you want to make a game without characters, use this script:

Code:
function playerAdded(c)
    if c:isA("Character") then
        c:remove()
        game.Camera.FollowObject = game.World.PartHere
        game.Camera.ScaleFactor = 7
    end
end

link(game.World.ChildAdded, playerAdded)

game.World.PartHere should be the new part the camera should be centered on.

Example: http://buildism.net/game.php?id=733