Click or drag to resize
AnimalIsMySpecies Method

Allows a creature to determine if the OrganismState of another creature represents the same species. This can be used to determine whether you should attack/defend against another creature.

Creatures of the same species often don't fight one another, defend against one another, and kill one another. They often help their own species in fights against other species. Carnivores of the same species may sacrifice themselves as food once they become too old to members of their species.

Namespace: Terrarium.Sdk.Classes.Creature
Assembly: Terrarium.Sdk (in Terrarium.Sdk.dll) Version: 1.1.0.0 (1.1.0.0)
Syntax
public bool IsMySpecies(
	OrganismState targetState
)

Parameters

targetState
Type: Terrarium.Sdk.Classes.StateOrganismState
The OrganismState for the creature to be used in species comparison.

Return Value

Type: Boolean
True if the organism owning the state object is of the same species, false otherwise.
Exceptions
ExceptionCondition
ArgumentNullException Thrown if the targetState parameter is null.
See Also