Jump to content

Home

Another Scripting question


brwarner

Recommended Posts

Change their factions to prey and predator:

void main()
{
ChangeToStandardFaction(GetObjectByTag("object1_tag"), STANDARD_FACTION_PREDATOR);
ChangeToStandardFaction(GetObjectByTag("object2_tag"), STANDARD_FACTION_PREY);
}

Depending on what you want to do, you may also use the SetMinOneHP function .

Link to comment
Share on other sites

Try this:

void main() 
{ 
  object oNPC1= GetObjectByTag("insert_object_tag"); 
  object oNPC2= GetObjectByTag("insert_object_tag"); 
  ChangeToStandardFaction(oNPC1, STANDARD_FACTION_PREDATOR); 
  ChangeToStandardFaction(oNPC2, STANDARD_FACTION_PREY);

//these 2 lines will make them immortal and they will fight forever - remove them if you don't want this.
  SetMinOneHP(oNPC1,TRUE);
  SetMinOneHP(oNPC2,TRUE);

  DelayCommand(1.0, AssignCommand(oNPC1, ActionAttack(oNPC2)); 
}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...