Aller au contenu

Photo

My OnDeath scipt is only firing once?


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
Mr. Versipellis

Mr. Versipellis
  • Members
  • 206 messages
 I made a thread about this about a month ago but it died off. I've got an OnDeath script here which should resurrect an npc tagged "Erno", who is the owner of the script, and then add him back to the party. This seems to work fine, but only for the first death - the second time he dies, his corpse just sits there, not doing an awful lot. Does anyone know what could be causing this?

#2
ehye_khandee

ehye_khandee
  • Members
  • 855 messages
Just skimming thru the code... the part that reads:

//Double-hit thing to stop the body from getting destroyed or anything
if (GetDidDie()) return;
else SetDidDie();


looks like it might be the culprit - do these functions 'unset' the data when done using it or do they leave the flag set and thus trip on second pass through?

Be well. Game on.
GM_ODA

#3
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages

ehye_khandee wrote...

Just skimming thru the code... the part that reads:

//Double-hit thing to stop the body from getting destroyed or anything
if (GetDidDie()) return;
else SetDidDie();


looks like it might be the culprit - do these functions 'unset' the data when done using it or do they leave the flag set and thus trip on second pass through?

Be well. Game on.
GM_ODA



It looks like it was removed,  Most likely the problem.   

http://social.biowar...942323#13023659 

#4
Mr. Versipellis

Mr. Versipellis
  • Members
  • 206 messages
That did the trick. Thanks!