Jump to content

Home

Quick Scripting Question


Recommended Posts

Assuming this is for TSL, you can try this:

 

void main() {
  object oTarget = GetFirstObjectInArea( OBJECT_INVALID, OBJECT_TYPE_CREATURE );
  while( GetIsObjectValid( oTarget ) ) {
     if( GetIsEnemy( oTarget ) ) {
        AssignCommand( oTarget, ClearAllActions() );
        SetCommandable( FALSE, oTarget );
        ApplyEffectToObject( DURATION_TYPE_INSTANT, EffectDeath( FALSE, TRUE, TRUE ), oTarget, 0.00 );
     }
     oTarget = GetNextObjectInArea( OBJECT_INVALID, OBJECT_TYPE_CREATURE );
  }
}

 

- Star Admiral

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...