Skip to content
aubergine10 edited this page Oct 19, 2015 · 1 revision

##Overview

The Create() event is called only once per script instance, when the object it is associated with is first created (spawned, constructed or, in the case of Entities, placed) on the map.

##Syntax

function Create()
  -- your code here
end

##Example

local x, y

function Create()
  x, y = this.Pos.x, this.Pos.y
end

##See Also

^ Open "Pages" to Search



Guides:

  • [Lua Basics](Lua Basics Guide)
  • [Save-Load Cycle](Save-Load Cycle Guide)

[Globals](Object Globals):

  • [Game](Game (Global))
  • [me](me (Global))
  • [Object](Object (Global))
  • [this](this (Global))

[Events](Object Events):

Psuedo-Types:

  • [Rotation table](Rotation table)
  • [Id table](Id table)
  • [Location table](Location table)
  • [Velocity table](Velocity table)

[Methods](Object Methods):

[Properties](Object Properties):

Clone this wiki locally