Entity Functions

From theFarWilds
Revision as of 18:41, 19 March 2010 by Jed (Talk | contribs)

Jump to: navigation, search

Scripting Entity Functions are called on the Entity object. For example

Entity ent=getFigure(createLocation(3,3));
ent.remove();

List of functions:

bool isValid();
string getName();
Player getController();
void setController(Player);

bool isType(int type);
// Types: Creature=1, Building=2,Enchantment=3,Item=4,(Corpse,Flux Well,Ruin)=5,World Enchantment=6

Location getLoc();
bool moveEntity(Location);
// returns false if it can't move there

void remove();
void destroy();
void sacrifice();