Jump to content


Photo

!HPGT(LastSummonerOf,0)


  • Please log in to reply
5 replies to this topic

#1 temnix

temnix
  • Member
  • 983 posts

Posted 05 February 2018 - 05:29 PM

This is a nice trigger for letting minions know that their summoner has died. Creatures don't react to HPLT(1), nor to General(DEAD), nor to overrides for the Died() and Die() triggers, and they refuse to count death in CD_STATE_NOTVALID. But if you ask them whether their summoner doesn't have hit points above zero, this they recognize...

 

I'm putting up this little poem for those who want to delve into death. Without minions your only option would be to use a contingency, and that's going to give you a message - it might - and would interfere and be rejected by other contingencies with the same condition that might be on a character.



#2 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 25 February 2018 - 11:00 PM

Try Dead() not Died()? Just wondering.


Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#3 Avenger_teambg

Avenger_teambg
  • Member
  • 604 posts

Posted 26 February 2018 - 09:08 AM

Try Dead() not Died()? Just wondering.

Dead doesn't accept an object, unless you are in iwd2. Dead takes the scripting name, and creates a DV from it, then checks if it is nonzero.

If the creature has no scripting name, its death isn't registered.

 

Statecheck should work, i don't know what temnix missed with it.


Edited by Avenger_teambg, 26 February 2018 - 09:10 AM.

Avenger

#4 temnix

temnix
  • Member
  • 983 posts

Posted 26 February 2018 - 01:45 PM

To detect a state you first have to detect the creature, and dead critters are invisible. I've spent any amount of time trying, so just take my word for it. You can't get to them with Nearest() etc., LastSeenBy() or anything else. Except, possibly, the script name. I don't remembered if I tested for that, but in any case I looked for a universal way to latch on to a creature, not a special-case application.

 

And a creature without a script name is memorialized like everyone else. Their script names as really "none," and they increment the enormous ...NONE death global.



#5 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 26 February 2018 - 02:51 PM

Except, possibly, the script name. I don't remembered if I tested for that...

Well, it surely wouldn't hurt. Even summonees should have script names.


Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#6 temnix

temnix
  • Member
  • 983 posts

Posted 27 February 2018 - 04:18 PM

Think before you talk, Miloch. How would they have script names? Each one a different name? Or all of them the same name, and then it would only work for the last one? I've suggested before patching all creatures without a script name to have the None name, because they increment that death variable anyway, and with None we could at least command them in the order of appearance. That idea is still on the table.