SetSummonHelpIfAttacked

From NWN Lexicon
Jump to navigationJump to search



SetSummonHelpIfAttacked()

Note: This function page documents something only available in the nw_i0_generic include file. The function may not be accurately documented here but you can read the nwscript code for the function in the game files.

Creates an encounter that is meant to help an attacked NPC.

void SetSummonHelpIfAttacked();

Description

This function works in tandem with an encounter to spawn in guards to fight for the attacked NPC.



Remarks

This function is called from BioWare's core AI scripts if the spawn in flag NW_FLAG_SET_WARNINGS is set to TRUE.

Make sure the encounter tag is set to "ENC_" + NPC TAG.


Known Bugs

The comment for this function is:
// Presently Does not work with the current implementation of encounter trigger

The function sets an encounter to active. I suppose that, when the function was first created, it was meant to use SetEncounterActive to actually spawn the creatures within the encounter, which is indeed not the way SetEncounterActive works.
The function is, however, called from within the default OnPhysicalAttacked script, and the encounters WILL be active after calling this function.


Requirements

#include " NW_I0_GENERIC "

Version

1.22

See Also



 author: Tom Cassiotis, editor: Lilac Soul