This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
tnhscript:awarenessfilter [2009/02/05 23:27] 127.0.0.1 external edit |
tnhscript:awarenessfilter [2010/11/23 00:11] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== AwarenessFilter ====== | ====== AwarenessFilter ====== | ||
- | When placed on another object, an AI can send a ``CanISeeYou`` or ``CanIHearYou`` message to test for awareness of the object from the AI. When placed on an AI, it can send ``CanISeePlayer`` or ``CanIHearPlayer`` messages to itself to test for awareness of the ``Player`` object. Or it can send ``CanISeeObject`` or ``CanIHearObject`` with the object specified in the first data parameter. | + | When placed on another object, an AI can send a ``CanISeeYou`` or ``CanIHearYou`` message to test for awareness of the object from the AI. When placed on an AI, it can send ``CanISeePlayer`` or ``CanIHearPlayer`` messages to itself to test for awareness of the ``Player`` object. Or it can send ``CanISeeObject`` or ``CanIHearObject`` with the object specified in the first data argument. |
+ | |||
+ | When checking for an arbitrary object, the name or ID is put in the message argument. The special name $$self$$ is the object that receives the message. The name $$source$$ is the object sending the message. An archetype can be specified by prepending a $$^$$ to the object name. The script will look for a nearby object of that type. | ||
^Messages | ``CanISeeYou``, ``CanIHearYou``, ``CanISeeObject``, ``CanIHearObject``, ``CanISeePlayer``, ``CanIHearPlayer`` | | ^Messages | ``CanISeeYou``, ``CanIHearYou``, ``CanISeeObject``, ``CanIHearObject``, ``CanISeePlayer``, ``CanIHearPlayer`` | | ||
^Links | ``[[dromed:link:AIAwareness]]`` | | ^Links | ``[[dromed:link:AIAwareness]]`` | | ||
- | ---- | ||
- | [[index|Back to index]] | ||