Variables not changing?

Post » Fri Nov 09, 2012 7:12 am

I have a problem with my Mod. For some reason, some Variables do not seem to be changing.

I'm running this code :
[Code]
If ( KillDone == 0 )
Set KillDone to 1
Set ZGRNVGhoulsKilled to ( ZGRNVGhoulsKilled + 1 )
MyTarg.RemoveItem ZGRNVGhoulItem 1
EndIf
[/code]

The Script is an Object Script, attached to an armour piece in the NPC's Inventory. It checks if the Ghoul is dead, and then increments a Global Variable that keeps track of how many Ghouls have been killed. The item is 'meant' to then remove itself (specifically to try and stop this bug, that wasn't part of the original code).

'Set KillDone to 1' should make KillDone = 1, so it won't pass the 'If ( KillDone == 0 )' check, but for some reason the variable is running indefinitely.

I've checked through the script with a Text Editor, and there are only three references to KillDone, the two here, and the Short KillDone definition at the start of the script.

Anyone any ideas?
User avatar
lucile davignon
 
Posts: 3375
Joined: Thu Mar 22, 2007 10:40 pm

Return to Fallout: New Vegas