I am writing a heartbeat script for a persistent feat - all it does is apply a couple of effects if the conditions are met.
The conditions:
In Combat
HitPoints < half
Number of enemies > Hit Dice + a stat bonus
That is about it - So I am using a while loop to cycle through perceived enemies - this is where the problem starts...
If the PC initiates combat by clicking at a distance on the perceived enemy first the game freezes and dies
If the NPC initiates combat first by attacking first everything is fine.
I know - that is weird aye?
Whats more - right now all there is in the while loop is a SendMessageToPC statement - if the while loop is totally empty of code - other than getnextobjectinshape() nothing locks - but there is no code running - not very usefull - I will post the code if anyone wants to take a poke at this strange script behavior - or maybe there is a more obvious solution??
I have built similar HB scripts before - really complex ones - but this one is giving me grief - I know not why...
Modifié par Morbane, 20 juillet 2010 - 02:53 .





Retour en haut







