11 lines
365 B
Plaintext
11 lines
365 B
Plaintext
void main()
|
|
{
|
|
object nearestPC = GetNearestCreature( CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC );
|
|
float distance = GetDistanceBetween( nearestPC, OBJECT_SELF );
|
|
if ( distance <= 0.0 )
|
|
{
|
|
effect light = EffectVisualEffect( VFX_DUR_PROT_SHADOW_ARMOR );
|
|
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, light, OBJECT_SELF, 3600.0 );
|
|
}
|
|
}
|