Zippy-Egoboo Home EgoWiki > Documentation > MakingZippyObjects > ZippyCharacterType EgoWiki webs:
Main | TWiki | Know | Sandbox
Documentation . { Changes | Index | Search | Go }
Character types are defined with the following syntax:

register_type{ [PrimaryBaseType [, SecondaryBaseType [, ...]]];
   name = "TypeName",
   namespace = Namespace,
   [attribs = { }],
   [alerts = { alert_name = alert_function }],
   [profile = { }]
}

This will create a type named "TypeName" derived from "PrimaryBaseType" and "SecondaryBaseType" in the namespace "Namespace" (see ZippyNamespaces). The type may optionally have class variables (in the "attribs" sub-table), alert handlers (in the "alerts" sub-table), and a profile (in the "profile" sub-table).

An actual character may be spawned with the following syntax:

Namespace.Typename(x, y, z, name, team, skin_name, starting_life, is_player [, extras])

x, y, z
The position of the new character. These may be replaced with "Vector{x, y, z}" or a single vector-value.
name
The name of the character, or nil for a randomly-generated name.
team
The team to which the charcter belongs (see ZippyTeams).
skin_name
A string identifying the starting skin of the character.
starting_life
The starting life of the character, or -1 to indicate maximum life.
is_player
nil for NPCs and items, non-nil for characters that will be controlled by a human player.
extras
any extra arguments will be passed along to the type constructor (see ZippyCharacterTypeVars).

-- ElminI - 29 Jan 2004

Topic ZippyCharacterType . { Edit | Attach | Ref-By | Printable | Diffs | r1.2 | > | r1.1 | More }
Revision r1.2 - 30 Jan 2004 - 20:05 GMT - ElminI
Parents: WebHome > MakingZippyObjects
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding EgoWiki? Send feedback.