Classes

Concepts

Libraries

advertisement »

ambientSounds »

bitser »

contentPoints »

eventBoxText »

factValidity »

frameBuffer »

officeBuildingInserter »

priorityRenderer »

randomEvents »

scaling »

spritesheetParser »

statusIcons »

test3 »

util »

Objects

objects.create

Description

Creates an instance of the specified class.

Arguments

1 string className

the class name.

2 vararg args

arguments to pass into the object's :init method.

Example

local puddle = objects.create("water_puddle")
puddle:setPos(x * game.WORLD_TILE_WIDTH, y * game.WORLD_TILE_HEIGHT)
game.worldObject:addDecorEntity(puddle, true)