Jump to content

Why does the script sometimes not start (example)


HerrSvensson

Recommended Posts

Here is an example of a script I just did to test if the AI would react to being attacked by different enemies:

 

IF
AttackedBy(NearestEnemyOf(),DEFAULT)
THEN
RESPONSE #100
DisplayStringHead(NearestEnemyOf(),40734)
Continue()
END

IF
AttackedBy(SecondNearestEnemyOf(),DEFAULT)
NumCreatureGT([ENEMY], 1)
THEN
RESPONSE #100
DisplayStringHead(SecondNearestEnemyOf(),40735)
Continue()
END

IF
AttackedBy(ThirdNearestEnemyOf(),DEFAULT)
NumCreatureGT([ENEMY], 2)
THEN
RESPONSE #100
DisplayStringHead(ThirdNearestEnemyOf(),40736)
Continue()
END

 

What is weird about this script is that it works only after I set the script in combat. By that I mean, when I am outside of combat, and activate the script and then go to combat, nothing happens. But when I set the script when combat has started, it works like expected.

 

Does anyone know how to make it work regardless of whether you're in combat or not?

Link to comment

IESDP is your friend :

 

0x4083 CombatCounter(I:Number*)

This trigger does may not work as expected.

 

Returns true only if the combat counter (counts down from 150 after each attack) is of the value specified. CombatCounter(0) returns true only if there is no combat in the active area at the moment. CombatCounter can give false results after dialog has been completed or after a Hide in Shadows check has been failed.

Link to comment

IESDP is your friend :

 

0x4083 CombatCounter(I:Number*)

This trigger does may not work as expected.

 

Returns true only if the combat counter (counts down from 150 after each attack) is of the value specified. CombatCounter(0) returns true only if there is no combat in the active area at the moment. CombatCounter can give false results after dialog has been completed or after a Hide in Shadows check has been failed.

I didn't use CombatCounter. How does this information help?
Link to comment

Archived

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

×
×
  • Create New...