Jump to content


Photo

Dead() and SPRITE_IS_DEAD varisbles


  • Please log in to reply
4 replies to this topic

#1 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 09 June 2005 - 07:04 AM

I've learned that not all deaths set SPRITE_IS_DEAD variables properly.
Please, could somebody tell me more specifically what's wrong there...

And could such a piece of NPC's script as
IF
	HPLT(Myself,1)
THEN
	RESPONSE #100
  SetGlobal("SPRITE_IS_DEAD...","GLOBAL",1)
END
solve a problem and will it work in those "uncovered" death cases?

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#2 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 09 June 2005 - 07:59 AM

SPRITE_IS_DEAD is based off death variable. Assign the creature a DV and SPRITE_IS_DEAD should be set properly. (Incidentally this is why DVs shouldn't be longer than 18 charecters; the extra 14 characters from SPRITE_IS_DEAD would result in a global variable of > 32 characters, which the engine ignores.)

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#3 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 09 June 2005 - 09:23 AM

Added point, summoned creatures don't have a DV.

The great wolf Fenrir gapes ever at the dwelling of the gods.


#4 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 09 June 2005 - 10:06 AM

What was a point in BP then to introduce '<name>Alive' variables to track creatures state instead of plain Dead() checks? Is something really wrong with it or it was just author's touch?

0x4051 Dead(S:Name*)
Returns only true if the creature with the specified script name has its death variable set to 1. [B]Not every form of death sets this[/B], but most do. So it's an almost complete test for death. The creature must have existed for this to be true.
Which 'form of death' doesn't set it?

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#5 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 10 June 2005 - 08:09 PM

What was a point in BP then to introduce '<name>Alive' variables to track creatures state instead of plain Dead() checks? Is something really wrong with it or it was just author's touch?

0x4051 Dead(S:Name*)
Returns only true if the creature with the specified script name has its death variable set to 1. [B]Not every form of death sets this[/B], but most do. So it's an almost complete test for death. The creature must have existed for this to be true.
Which 'form of death' doesn't set it?

View Post


The easiest, most sure-fire way to screw up this variable is to use ctrl+r to raise your npc from death. Also, some times in heavy combat situations (big batles, like the yagu shura battles in tob e.g.)--the engine doesn't parse quickly enough (like, if you immediately used a rod of resurrection).

The variable I used, and where I set it at (in a relatively calm place in the game action), was a double failsafe to make certain that things could not get screwed up. Perhaps the best reason is that when beta-testing, I quite often used ctrl+r to avoid repeating unecessary steps in the game progression.