RemoveAmbientSleep()

Removes a sleep effect on a successful listen check.

void RemoveAmbientSleep();

Description

This utility function can be used to wake creatures that have been set to simulated sleep (they are the creators of the sleep effect).

If the creature from which this function is called rolls a successful DC 15 listen check (with wisdom modifiers) then the sleep effect is removed.



Remarks

You can simulate "I'm going to bed" sleep (as opposed to the sleep spell) by applying SleepEffect in the OnSpawn of the creature so the creator of the sleep effect is the creature (OBJECT_SELF). This function can then be used, as it is in the core AI, to do proper listen checks to help faction members that are calling for help.

Also see David Gaider's Scripting FAQ for more information on sleep.


Requirements

#include "NW_I0_GENERIC"

Version

1.29

See Also

functions: EffectSleep
categories: Core AI Functions
events: OnPlayerRest Event | OnRested Event


 author: Tom Cassiotis, editors: Jody Fletcher, Mistress