The Terasology Foundation

Behaviours 3: On-the-fly Alterations

<- Previous Task Next Task ->

Another great thing about Terasology is that you can test whatever you develop in-game. You can create commands to assign behaviors to creatures from the in-hame console, and see if your behaviors are actually working.

The objective of this task is to get the student familiarized with the usage of behavior within the game. At the end of this task, the student will have learned how to assign a behavior to a creature during gameplay.

Requirements

The student must fork the module BehaviorsBasic, clone the fork under Terasology/modules, and modify the existing InitialBehaviorSystem so that when the player executes the command assignBehavior in the in-game console, all creatures of the type redDeer are assigned the behavior created by the student in the previous task.

Acceptance Criteria

The student must submit a PR compliant to the task requirements. The submission will be verified according to the following script:

  • Two creatures (redDeer) will be spawned using the in-game console;
  • The command assignBehavior will be executed

Resources & References (Where to Start)

  • If you want to learn how to programmatically assign behaviors to creatures, we advise you to check our step-by-step tutorial. Also, check other modules that use behaviors extensively, such as the WildAnimals module.

Task tags

  • ai
  • animals
  • json
  • java
  • Terasology

Students who completed this task

HannahG, M.Kasker, Kanonbell

Task type

  • code Code
  • web Design
close

2019