(11-12-2010, 01:31 PM)Arvaga Wrote: Now I see you use AddLocalVarInt to add the values, but you are using GetGlobalVarInt, my guess is that it should be GetLocal and that you have to set the variable with SetLocalVar before using it.
Nur, that last section of code was a mistake on my part. That was a copy/paste from when I was using global variables instead of local variables but switched it to local variables because that made more sense (and also because the global variables weren't working and I figured that the local variables might). If you look in the original code at the top, it does use the GetLocalVarInt() function. I have also tried adding SetLocalVariableInt("NumBodyParts",0) in the "Run first time starting map" section, but it didn't make a difference and none of the examples I have seen in the amnesia game code use this. Also the example
here does not require this.
Humm, Problem solved... for some reason
if(GetLocalVarInt("NumBodyParts") == 3)
needed to be changed to
if(GetLocalVarInt("NumBodyParts") == 2)
I don't really understand this.... but it works now. :/
Edit again:
Duh, I know why. Because the if function is checking to see if there are 3 body parts in the grill BEFORE it's adding the third value to the function so... ok. It all makes sense now.