EffectSleep()

Returns a sleep effect.

effect EffectSleep();

Description

Returns a sleep effect which can then be applied to an object.



Remarks

EffectSleep only creates the effect, it does not apply it.


Version

1.22

Example

// Example 1 - Create a sleep effect and apply it to a PC for a duration of 3 minutes.

  object oPC = GetLastUsedBy();
  effect eSleepEffect = EffectSleep();
  ApplyEffectToObject(DURATION_TYPE_INSTANT,eSleepEffect,oPC,180.0f);

// Example 2 - Use EffectSleep() directly without an effect 
// variable.

  object oPC = GetLastUsedBy();
  ApplyEffectToObject( DURATION_TYPE_INSTANT, EffectSleep(), oPC, 180.0f);

See Also

functions: ApplyEffectToObject | RemoveAmbientSleep
categories: Effects Functions


 author: Brett Lathrope
 Send comments on this topic.