Difference between revisions of "Entity Functions"
From theFarWilds
(New page: Scripting Entity Functions are called on the Entity object. For example Entity ent=getFigure(createLocation(3,3)); ent.remove(); List of functions:) |
|||
Line 6: | Line 6: | ||
List of functions: | 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(); |
Revision as of 18:41, 19 March 2010
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();