Find (Procedure)

From the CreationKit Wiki
Revision as of 11:15, 9 November 2011 by imported>Henning (moved Procedure Find to Find (Procedure))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Behavior

Description:
Allows an actor to mentally search a location for a specified object or type of object.

  • The actor will do a mental search at the specified Location.
    • If the actor finds valid objects, it will fill the object list with those objects.

The procedure completes:
This procedure does NOT complete. (Usually paired with a simultaneous Wait Procedure)

Parameters

  • SearchLocation (Location): Specifies a location (usually a reference + radius) to mentally search.
  • TargetSelector (TargetSelector): Specifies what the actor should be looking for. This could be a specific reference, a specific type of base object, or something more general like "food", a "weapon" or "ammo."
  • ObjectList (ObjectList): This list is ***populated*** when the Find procedure is successful. It is a list of all things that the Find procedure found. This can later be used by another procedure, such as "Acquire" in order to pick up the object that was found in the search location. (Usually this is hooked up to private data and fed to a "target" parameter of another procedure like Acquire, Eat, Sit, etc.)
  • SearchOwnerInventory (Bool): Can the actor find things he has in his own inventory. (Usually true)
  • RandomizeList (Bool): Found things are deterministically found. This randomizes the object list.

                             

Notes

  • Does this procedure have a defined ending?
    • Yes, when the actor has found something that matches an object defined by the Target Selector. If the procedure doesn't find anything, it will not end on its own. (You would want to pair this procedure with a Wait or some other procedure in a simultaneous branch.)
  • How many objects will this procedure find?
    • It should fill the Object List with all of the valid objects that exist in the location.
  • Does this procedure cause the actor to do any physical behavior?
    • No, the procedure is purely mental. It is only there to populate the object list.
  • Does the actor have to be at the search location?

See Also

{{{SeeAlso}}}