Actors – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " (={2,})([^ = ])(.*)([^ = ])(={2,}) * " to " $1 $2$3$4 $5 ")
m (Text replacement - "[[Ylands_" to "[[Ylands:")
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Overview=
=Overview=
Unlike Entities, Actors can use [[Ylands_Game_logic_-_AI_Behavior|AI Behaviour]] to seem alive. There are 4 categories of Actors:
Unlike Entities, Actors can use [[Ylands:Game_logic_-_AI_Behavior|AI Behaviour]] to seem alive. There are 4 categories of Actors:
*NPCs
*NPCs
*Animals
*Animals
Line 11: Line 11:
*Animals, Mutants, and Monsters have '''Color''', '''Damage''' and '''Resistances''' sections. The drops for these can be removed by unchecking "Destroyed Entities in World Drop Items" in the Game Settings.
*Animals, Mutants, and Monsters have '''Color''', '''Damage''' and '''Resistances''' sections. The drops for these can be removed by unchecking "Destroyed Entities in World Drop Items" in the Game Settings.
*Animals and Mutants can be Domesticated and their '''Default Domestication Level''' can be set.
*Animals and Mutants can be Domesticated and their '''Default Domestication Level''' can be set.
*Only NPCs can have an editable '''Appearance''', '''Equipment''' and '''Inventory'''. There is also an option to '''Drop Items on Death'''. Their '''Default Interaction''' is [[Ylands_Trade|Trading]] unless it is [[Ylands_Tile_-_Can_character_trade|removed using scripting]] or [[Ylands_Tile_-_Set_entity_interactions|overwritten with a custom interaction]].  
*Only NPCs can have an editable '''Appearance''', '''Equipment''' and '''Inventory'''. There is also an option to '''Drop Items on Death'''. Their '''Default Interaction''' is [[Ylands:Trade|Trading]] unless it is [[Ylands:Tile_-_Can_character_trade|removed using scripting]] or [[Ylands:Tile_-_Set_entity_interactions|overwritten with a custom interaction]].  


=Related Game Logic=
= Related Game Logic =
*[[Ylands_Game_logic_-_AI_Behavior|AI Behaviour]]
*[[Ylands:Game_logic_-_AI_Behavior|AI Behaviour]]


=Actor Events=
= Actor Events =
All actors have some unique [[Ylands_Tile_category_-_Events|Event Tiles]]:
All actors have some unique [[Ylands:Tile_category_-_Events|Event Tiles]]:
*[[Ylands Tile - On Damage Entity Event|On Damage Received/On Do Damage]]
*[[Ylands:Tile - On Damage Entity Event|On Damage Received/On Do Damage]]
*[[Ylands Tile - On Kill Entity Event|On Kill/On Was Killed]]
*[[Ylands:Tile - On Kill Entity Event|On Kill/On Was Killed]]
*[[Ylands Tile - On Interact Event|On Custom Interaction]]
*[[Ylands:Tile - On Interact Event|On Custom Interaction]]
*[[Ylands Tile - On Paint Event|On Color Change]]
*[[Ylands:Tile - On Paint Event|On Color Change]]
*[[Ylands Tile - On Revert Color Event|On Color Revert]]
*[[Ylands:Tile - On Revert Color Event|On Color Revert]]


Animals, Mutants, and Monsters:
Animals, Mutants, and Monsters:
*[[Ylands_Tile_-_On_NPC_attack|On Attack]]
*[[Ylands:Tile_-_On_NPC_attack|On Attack]]


Animals and Mutants:
Animals and Mutants:
*[[Ylands_Tile_-_On_Feed_Animal_Event|On Feed Animal]]
*[[Ylands:Tile_-_On_Feed_Animal_Event|On Feed Animal]]
*[[Ylands_Tile_-_On_Mount-Dismount_Entity_Event|On Mount/On Dismount]]
*[[Ylands:Tile_-_On_Mount-Dismount_Entity_Event|On Mount/On Dismount]]


NPCs:
NPCs:
*[[Ylands_Tile_-_On_Trade_Entity_Event|On Trade]]
*[[Ylands:Tile_-_On_Trade_Entity_Event|On Trade]]


=Related Instructions=
= Related Instructions =
Most of the [[Ylands_Script_tiles_list|Script Tiles]] relating to entities (See the full list [[Ylands_Tile_category_-_Entities|here]]) can be used on Actors, but there are some script tiles that are more relevant:
Most of the [[Ylands:Script_tiles_list|Script Tiles]] relating to entities (See the full list [[Ylands:Tile_category_-_Entities|here]]) can be used on Actors, but there are some script tiles that are more relevant:
*[[Ylands_Tile_-_AI_-_Get-set_entity|Get AI Behaviour/Set AI Behaviour]]
*[[Ylands:Tile_-_AI_-_Get-set_entity|Get AI Behaviour/Set AI Behaviour]]
*[[Ylands_Tile_-_Get-Set_healthbar_visibility|Get Health Bar Visibility/Set Health Bar Visibility]]
*[[Ylands:Tile_-_Get-Set_healthbar_visibility|Get Health Bar Visibility/Set Health Bar Visibility]]


For Animals and Mutants:
For Animals and Mutants:
*[[Ylands_Tile_-_Get-set_domestication_level|Domestication]]
*[[Ylands:Tile_-_Get-set_domestication_level|Domestication]]
*[[Ylands_Tile_-_Get-set_animal_owner|Animal Owner]]
*[[Ylands:Tile_-_Get-set_animal_owner|Animal Owner]]
*[[Ylands_Tile_-_Character_controlled_entity|Character Controlled Entity]]
*[[Ylands:Tile_-_Character_controlled_entity|Character Controlled Entity]]


For NPCs:
For NPCs:
*[[Ylands Tile - Character inventory|Get Character Inventory]]  
*[[Ylands:Tile - Character inventory|Get Character Inventory]]  
*[[Ylands_Tile_-_Character_equipment|Get Character Equipment]]
*[[Ylands:Tile_-_Character_equipment|Get Character Equipment]]
*[[Ylands_Tile_-_Can_character_trade|Can Character Trade]]
*[[Ylands:Tile_-_Can_character_trade|Can Character Trade]]
*[[Ylands_Tile_-_Play_emote|Play Emote]]
*[[Ylands:Tile_-_Play_emote|Play Emote]]


=== Notes ===
=== Notes ===
*Although Actors cannot be animated or use script tiles related to animation, such as [[Ylands_Tile_-_Aim_to_object|Aim]] or [[Ylands_Tile_-_Follow_object|Follow]], they can be moved and rotated with [[Ylands_Tile_-_Entity_position-rotation|Set Position and Set Rotation]] or [[Ylands_Tile_-_Transform_position-rotation|Transform Position and Transform Rotation]].
*Although Actors cannot be animated or use script tiles related to animation, such as [[Ylands:Tile_-_Aim_to_object|Aim]] or [[Ylands:Tile_-_Follow_object|Follow]], they can be moved and rotated with [[Ylands:Tile_-_Entity_position-rotation|Set Position and Set Rotation]] or [[Ylands:Tile_-_Transform_position-rotation|Transform Position and Transform Rotation]].
*[[Ylands_Tile_-_Entity_position-rotation|Set Position]] followed by [[Ylands_Tile_-_AI_-_Get-set_entity|Set AI Behaviour]]  to Stand will usually make the NPC walk to the correct position and the other Actors will teleport to that position. If the AI is set to stand before the position is set, the Actor will teleport to the set position and then walk back to the original location they were when the AI behaviour was changed to Stand. This can be fixed by using a separate AI Behaviour Game Logic set to Stand.
*[[Ylands:Tile_-_Entity_position-rotation|Set Position]] followed by [[Ylands:Tile_-_AI_-_Get-set_entity|Set AI Behaviour]]  to Stand will usually make the NPC walk to the correct position and the other Actors will teleport to that position. If the AI is set to stand before the position is set, the Actor will teleport to the set position and then walk back to the original location they were when the AI behaviour was changed to Stand. This can be fixed by using a separate AI Behaviour Game Logic set to Stand.


[[Category:Entity Tools]]
[[Category:Entity Tools]]

Latest revision as of 17:36, 16 November 2022

Overview

Unlike Entities, Actors can use AI Behaviour to seem alive. There are 4 categories of Actors:

  • NPCs
  • Animals
  • Mutants
  • Monsters

Properties

  • Like Entities, Actors have Position, Rotation, HP, and Interactions. They can be placed in a Group. Like Unique Entities, Actors can have Placed Particles.
  • Unlike Entities, they cannot have a Stack Value, cannot be set to Pickable, cannot be set as Animated, nor put in a Weld. All Actors can have AI Behaviour. They can have a Description which appears below the Actor's name and a Health Bar or Text above their heads.
  • Animals, Mutants, and Monsters have Color, Damage and Resistances sections. The drops for these can be removed by unchecking "Destroyed Entities in World Drop Items" in the Game Settings.
  • Animals and Mutants can be Domesticated and their Default Domestication Level can be set.
  • Only NPCs can have an editable Appearance, Equipment and Inventory. There is also an option to Drop Items on Death. Their Default Interaction is Trading unless it is removed using scripting or overwritten with a custom interaction.

Related Game Logic

Actor Events

All actors have some unique Event Tiles:

Animals, Mutants, and Monsters:

Animals and Mutants:

NPCs:

Related Instructions

Most of the Script Tiles relating to entities (See the full list here) can be used on Actors, but there are some script tiles that are more relevant:

For Animals and Mutants:

For NPCs:

Notes

  • Although Actors cannot be animated or use script tiles related to animation, such as Aim or Follow, they can be moved and rotated with Set Position and Set Rotation or Transform Position and Transform Rotation.
  • Set Position followed by Set AI Behaviour to Stand will usually make the NPC walk to the correct position and the other Actors will teleport to that position. If the AI is set to stand before the position is set, the Actor will teleport to the set position and then walk back to the original location they were when the AI behaviour was changed to Stand. This can be fixed by using a separate AI Behaviour Game Logic set to Stand.