Skip to content

Iterators

IsaacMulcahy edited this page Jan 29, 2023 · 3 revisions

Overview

These are used to allow for more control over behaviors and can be used to lower predictability of the NPC's as well as more provide more powerful solutions

How to Apply

These can be applied in the AI Flowchart Menu by clicking the grey arrow coming off of each node above the final level, this will present a widget with a list of options to select from. Certain nodes will have a default.

Example of how to apply Iterator

Types

In Order

This version will get the next node within the collection, it will not carry out checks before returning and will not loop.

Until Requirement Met

This will get the next node within the collection which requirements are met, this means it'll skip over ones which are not met. It will not loop.

Random Order

This will randomly select a node from the selection and will do so for the amount in the collection. It does not loop and can have duplicates

Random Unique Order

This will randomly select a node from the selection and will do so until nodes in the collection have run. It does not loop but can not have duplicates.

Until Fail

This version will get the next node within the collection, it will not carry out checks before returning but will loop. Failing will result in all other nodes being skipped like normal.

Until Requirement Weighted

This version will get the next node within the collection, it will not carry out checks before returning but will loop. Failing will result in all other nodes being skipped like normal. This will be done in order of local weight.

Weighted

This version will get the next node within the collection based upon local weighting, it will not carry out checks before returning and will not loop.