Skip to content
GrandSong edited this page Nov 1, 2016 · 2 revisions

Entities like guard, workman have SpriteVariants (defined in materials.txt). These variant has no real effect on gameplay.

.SubType is the ordinal number (starting from 1) of the variant used for the entity.

You can get and set the value of .SubType as long as the entity is not a prison and has SpriteVariants.

If an entity is created, its intial SubType value will be random.

SubType of Prisoners is about their bodies only. Their heads are generated seperatedly.

And the intial value of a prisoner's body SubType is not random. Changing it will cause game crash.

-- Contributor: GrandSong

^ 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