Jump to content

In Party and alive, but the game says "Dead()"!


Kulyok

Recommended Posts

Today I received a save game where Xan was in party, alive and kicking, but the game thought him dead. Dead("O#Xan") check returned true, and dialogue with another character went as if they thought Xan was dead(while he was standing right next to them). What's even funnier, InParty("O#Xan") returned true, too.

 

I really don't know what can cause this behavior, and that's my question: what?

(I'll tweak the checks in my mod, but I am curious).

 

As I've been told, Xan had been imprisoned and freedom'ed in this game earlier. Could it influence the Dead() check?

 

Also, I suspect, summoning one Xan, killing him, then summoning another should net you the same result.

 

But - anything else?

Link to comment

I know of a few ways this can be accomplished, but don't know if they apply here.

 

There's the bug with the CI lesser clay golems (igolfle[1-4].cre, etc). When the party enters the alarmed room in the first level of CI, the golems transform themselves from their inert creatures to their active via ChangeAnimation("IGOLFLE3/4"). However, if they were killed before this transformation, they still undergo this transformation and their little pop-up tag says 'Lesser Clay Golem - Dead'.

Link to comment

I'm tentatively guessing it's simpler than this. Whenever something with death variable "o#xan" dies, the game increments the global "SPRITEISDEAD_O#XAN" by one. Maybe this happens when you imprison someone too, I don't know. If Xan died and was resurrected (or possibly imprisoned and freed) I wouldn't be surprised if the game neglected to decrement "SPRITEISDEAD_O#XAN".

 

Possibly you could do

 

!InParty("o#xan")

InPartyAllowDead("0#xan")

 

as a more reliable check? ... I'm not sure, I don't have much practice modding playable characters.

Link to comment

It should happen when you get imprisoned (and stoned and frozen and whatever). Freedom should automagically set it back to 0. Somehow, your SPRITE_IS_DEAD var got stuck; I'd honestly just blame the player and ignore them. It's interesting that InParty() checks to see if the character is actually dead (rather than just looking at the variable, which is all Dead() does), but it's not that surprising.

 

!InParty() InPartyAllowDead() will only return true if the character is in the party but is dead. If you really think you're making a mistake somewhere (unless you're explicitly setting the death variable somewhere, I don't see how it's possible), just append his override script

IF
InParty(Myself)
Dead("O#Xan")
THEN
RESPONSE #100
SetGlobal("SPRITE_IS_DEADO#Xan","GLOBAL",0)
END

But yeah, in general, InParty() is sufficient to make sure that an object is in the party and is alive.

Link to comment
Possibly you could do

 

!InParty("o#xan")

InPartyAllowDead("0#xan")

 

as a more reliable check? ... I'm not sure, I don't have much practice modding playable characters.

 

Yes, this is exactly what I tried next, and it worked. I'll be sticking to it now.

 

 

@devSin: I'll try and check it when I get home, just in case. Thank you!

Link to comment

Archived

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

×
×
  • Create New...