User Tools

Site Tools


entity

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
entity [2017/06/12 15:30] – created justinentity [2024/01/30 15:22] (current) justin
Line 2: Line 2:
 ---- ----
  
-**Entity** is a generic term that refers to a tile, object, or character within the current scene.+**Entity** is a generic term that refers to a [[tile]][[object]][[character]], or [[effect]] within the current scene. In the context of scripting, it is a variable type that's used to reference entities by several possible methods. These are described in the table below. If the argument type for a scripting function is "Entity", either one of these types can be supplied or just the ID of the entity as a [[string]]. 
 + 
 +^Reference Type^Description^Example^ 
 +|Entity by ID|The entity with the specified unique ID.|look_at_target(entity["orange_cat"])| 
 +|Self|The entity to which the [[script]] was assigned.|play_animation(self, "open")| 
 +|Player|The primary [[player character]]. When referenced during a turn-based battle, this will be the active or most recent party member based on the current turn.|set_movement_speed(player, 60)| 
 +|Tile by Coordinate|The [[tile]] at the specified XYZ [[coordinate]].|tile[2, 4, 0]| 
 +|Initiator|The [[character]] who triggered the [[script]] through interaction.|damage_entity(initiator, 2)| 
 +|Party Member|The party member with the specified member ID. Supplying a member ID of "player" will return the primary [[player character]].|heal_entity(party.member["Sarah"], 5)| 
entity.1497306653.txt.gz · Last modified: 2017/06/12 15:30 by justin