OrganismBeginReproduction Method |
Use this function to command your creature to reproduce. There are many conditions on whether your creature can reproduce. If these conditions are not met, an exception will be thrown. The easiest way to make sure all pre-existing conditions have been met is to check the CanReproduce property.
If you call this method multiple times in the same turn, then the last call will be used, and all previous calls will be ignored. This method is also asynchronous, and a ReproduceCompletedEvent will be fired when your creature has actually given birth. The time between start and completion is 10 ticks.
Namespace: Terrarium.Sdk.Classes.Creature
Exception | Condition |
---|---|
AlreadyReproducingException | Thrown when your creature is already in the process of reproduction. |
NotMatureException | Thrown when your creature is not yet mature and you try to reproduce. |
NotEnoughEnergyException | Thrown when your creature does not have enough energy to start reproduction. |
NotReadyToReproduceException | Thrown when your creature is not yet ready to reproduce because the appropriate number of ticks has not elapsed. |