Changes

Jump to navigation Jump to search
→‎Other NPC changes: update Character fields
Line 6,297: Line 6,297:  
| The NPC which owns the sprite.
 
| The NPC which owns the sprite.
 
|-
 
|-
| <samp>Character</samp>
+
|rowspan="3"| <samp>Character</samp>
| <samp>GetGender</samp>
+
| <samp>IsVillager</samp>
| Get the character's gender as one of the numeric constants (<samp>NPC.female</samp>, <samp>NPC.male</samp>, or <samp>NPC.undefined</samp>). This returns the specific gender for players, villager NPCs, and children; other NPCs (like monsters) return <samp>NPC.undefined</samp>.
+
| Whether this is an NPC-type villager (i.e. not a monster, horse, pet, player's child, etc). In other words, this checks whether the NPC would use data from <samp>Data/Characters</samp> (regardless of whether they currently have an entry in the asset).
 +
|-
 +
| <samp>StandingPixel</samp>
 +
| The character's cached pixel position within the current location, based on the center pixel of their bounding box.
 +
|-
 +
| <samp>Tile</samp><br /><samp>TilePoint</samp>
 +
| The character's cached tile position within their current location. <samp>Tile</samp> is their exact non-integer position, and <samp>TilePoint</samp> is their integer tile position.
 
|-
 
|-
 
|rowspan="7"| <samp>FarmAnimal</samp>
 
|rowspan="7"| <samp>FarmAnimal</samp>
translators
8,438

edits

Navigation menu