SurrenderToEnemies()
Causes all creatures in a 10 meter (1 tile) radius to stop actions, improves the creature's reputation with nearby enemies for 3 minutes. Does not work for PCs or objects.
void SurrenderToEnemies();
Description
Use this on an NPC to cause all creatures within a 10-metre radius to stop what they are doing and sets the NPC's enemies within this range to be neutral towards the NPC for roughly 3 minutes. If this command is run on a PCor an object that is not a creature, nothing will happen.
Version
1.22
Example
//Cause an NPC to attack a player and then surrender so the player does not auto attack back at them. void main() { object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC); DelayCommand(2.0, SurrenderToEnemies()); ActionAttack(oPC, TRUE); }
See Also
functions: | AdjustReputation |
categories: | Combat Actions Functions | Reputation/Faction Functions |
author: John Shuell
Send comments on this topic.