EffectTrueSeeing()

Returns an effect of True Seeing.

effect EffectTrueSeeing();

Description

Creates a True Seeing effect which can then be applied to a creature target.



Remarks

EffectTrueSeeing() only creates the effect, it still must be applied to a creature using ApplyEffectToObject.

Using ApplyEffectAtLocation will result in no effect.


Version

1.22

Example

// Example 1 - An OnUsed script to create a True Seeing effect and then apply the effect to a PC with a duration of 60 seconds.

void main(){
  effect eTrueSeeing = EffectTrueSeeing();
  object oPC = GetLastUsedBy();
  if (!GetIsPC(oPC)) return;
  ApplyEffectToObject(DURATION_TYPE_INSTANT,eTrueSeeing,oPC,60.0f);
}

// Example 2 - Same script as Example 1, but uses 
// EffectTrueSeeing without the need of an effect variable.

void main(){
  object oPC = GetLastUsedBy();
  if (!GetIsPC(oPC)) return;
  ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectTrueSeeing(),oPC,60.0f);
}

See Also

functions: ApplyEffectToObject
categories: Effects Functions


 author: Brett Lathrope
 Send comments on this topic.