The Terasology Foundation

Behaviors 2: Crazy Composition!

<- Previous Task Next Task ->

Another great thing about Behaviors in Terasology: creatures can have more than one behavior! A deer can run away when a player gets near it AND mate with another deer - and everything can be defined in the same place, creating a "composite behavior".

The objective of this task is to get the student familiarized with behavior compositions. At the end of this task, the student will have learned how to attribute different behaviors to a creature according to different conditions.

Requirements

The student must design and implement a behavior file (.behavior) containing three different behavior modifications, to be triggered according to different conditions observed in-game. Feel free to add any modifications you like! Take a look at the existing behaviors (especially on the WildAnimals module) as a reference.

Acceptance Criteria

The student must submit a valid behavior file (.behavior) compliant to the task requirements. The submission will be tested as follows:

  • The file will be added to the WildAnimals module;
  • The behavior specified in the deer.prefab file will be replaced by the file submitted by the student; and
  • A deer will be spawned in-game to check if the behavior is working properly.

Resources & References (Where to Start)

If you want to have a better understanding of how behaviors work in Terasology, you can start by cheking the Behavior Wiki. If you want to create your own Behavior file, you can learn how to do it here.

Task tags

  • ai
  • Terasology
  • json
  • java

Students who completed this task

ujjman, HannahG, OSZKI, M.Kasker, Kanonbell

Task type

  • code Code
  • web Design
close

2019