Jump to content

How to ensure a regular death?


argent77

Recommended Posts

I’m creating a character which has to die with his default death animation. That’s why I have taken the MINHP1 item and stripped it down to the bare minimum of effects which (I think) are really nessessary. To make the creature killable I’ve also set the Minimum HP Limit effect to 0 HP.

 

The following immunities are still in effect:

- Kill Creature Type (FX #55)

- Instant Death (FX #13)

- Kill 60HP (FX #209)

- Petrification (#134)

- Disintegrate (FX #238)

- Imprisonment (FX #211)

- Polymorph into Specific (FX #135)

- Stat modifier (FX #6, #10, #15, #19, #44, #49) (not sure)

- Level Drain (FX #216) (not sure)

 

Do you know more effects which might prevent the normal death animation?

 

PS: The character is comparable to a familiar or summoned creature. So I won’t see his character record or any portrait icons.

Link to comment

You can still chunk or freeze.

Maybe you could use a regular minhp1 item and kill the creature via script when it's time to die. You could conceivably put the script on another creature if you don't want combat etc to interfere with it.

Link to comment
You can still chunk or freeze.
Chunking should be (theoretically) prevented by the 'Minimum HP Limit' effect (fx #208). I couldn’t chunk the creature even with over 200 dmg. per hit (or Ctrl+Y). The freezing effect might be avoidable too. I have to test this a bit further.

 

It looks like effect #55 and #209 don’t chunk (at least in combination with the above-mentioned effect).

 

Maybe you could use a regular minhp1 item and kill the creature via script when it's time to die.
It is worth testing, but wouldn’t that provoke bugs like the unkillable trolls?
Link to comment
Chunking should be (theoretically) prevented by the 'Minimum HP Limit' effect (fx #208).
Oh, yeah. My mistake.

 

Maybe you could use a regular minhp1 item and kill the creature via script when it's time to die.
It is worth testing, but wouldn’t that provoke bugs like the unkillable trolls?

If you run the script on the guy you may have problems. As a silly work-around you can put a invisible creature in the same area and run the script there.

Link to comment

I couldn’t find a way to prevent freezing. :) Effect #14 doesn’t work at all and I am hesitant to set his cold resistance to 100%.

 

Your advice by creating an invisible dummy creature sounds promising now. It has to be an auto-generated version though, because the character can be 'summoned' anywhere.

Link to comment
It has to be an auto-generated version though, because the character can be 'summoned' anywhere.

Oh, that's easy, at least.

 

IF
 //Some trigger
THEN RESPONSE #100
 //Some CreateCreature for the guy
 CreateCreatureImpassable("dummycre",[1.1],0)
 //Some action
END

[1.1] exists in every area and should be sufficiently out of the way that the party doesn't go around tripping over the invisible creature, assuming it's passable terrain.

 

Of course, like with other scripted deaths there's the chance he'll get hit, keep on living for a while and then just die without having received any additional damage.

 

There's also the method where the script runs on the guy and he stops to say "argh, you've killed me!" before the scripted death. It's used by Sendai and Abazigal, for example.

Link to comment
There's also the method where the script runs on the guy and he stops to say "argh, you've killed me!" before the scripted death. It's used by Sendai and Abazigal, for example.

This sounds like a good idea. It will conceal short script lags but shouldn’t happen when he is confused/stunned/asleep/etc. (might be prevented by StateCheck("MyChar",CD_STATE_NOTVALID)?).

 

But how do I circumvent proximity triggers? I don’t want to spawn the dummy creature in a lava pool and see the periodical damage report in the console.

Link to comment
This sounds like a good idea. It will conceal short script lags but shouldn’t happen when he is confused/stunned/asleep/etc. (might be prevented by StateCheck("MyChar",CD_STATE_NOTVALID)?).

I think most creatures that do this are immune to disabling effects. Scripts continue to run while the creature is under the effect of some disabling effects, but not all. I think confusion overrides the script, but e.g. fear and hold doesn't. A state check would prevent him from speaking while e.g. stunned but he also wouldn't die during that time.

 

But how do I circumvent proximity triggers? I don’t want to spawn the dummy creature in a lava pool and see the periodical damage report in the console.

Offhand I can't think of any areas where [1.1] features hazardous terrain. In the majority of case it's is not passable terrain (it's the upper left corner of the area).

Link to comment

OK, I’m trying to use a mix of the above-mentioned approaches. The character should shout for help when his HP are getting low, but should die right away when he reaches 1 HP.

 

This is the code for my dummy creature. I am very inexperienced in scripting yet. Do you still see loopholes in this code?

IF
Exists("A7MYCHAR")
!Dead("A7MYCHAR")
HPGT("A7MYCHAR",19)
Global("A7MYCHARSHOUTHELP", "GLOBAL", 1)
THEN RESPONSE #100
SetGlobal("A7MYCHARSHOUTHELP", "GLOBAL", 0)
END

IF
Exists("A7MYCHAR")
!Dead("A7MYCHAR")
HPLT("A7MYCHAR",20)
HPGT("A7MYCHAR",1)
!StateCheck("A7MYCHAR",CD_STATE_NOTVALID)
Global("A7MYCHARSHOUTHELP", "GLOBAL", 0)
THEN RESPONSE #100
SetGlobal("A7MYCHARSHOUTHELP", "GLOBAL", 1)
DisplayString("A7MYCHAR",1468)
END

IF
Exists("A7MYCHAR")
!Dead("A7MYCHAR")
HP("A7MYCHAR",1)
THEN RESPONSE #100
SetGlobal("A7MYCHARSHOUTHELP", "GLOBAL", 0)
Kill("A7MYCHAR")
END

IF
Dead("A7MYCHAR")
Exists("A7DUMMY")
THEN RESPONSE #100
DestroySelf()
END

Edit: Script corrections and additions...

Link to comment
As a silly work-around you can put a invisible creature in the same area and run the script there.
Hmm, is the creature actually invisible, or is it under the 271 eff ? Cause the friendly creatures at least won't be going invisible with the .cre flag... And neutral can always go hostile with area effects spells, and then you have a hostile unkillable BA against you.... well, could have.

 

Thanks...

Link to comment
Cause the friendly creatures at least won't be going invisible with the .cre flag...
You use opcode 20 if you want it invisible. The flags keep track states the creature's in.
And neutral can always go hostile with area effects spells, and then you have a hostile unkillable BA against you.... well, could have.

Creatures only go hostile if they are scripted to do so.

Link to comment
Hmm, is the creature actually invisible, or is it under the 271 eff ?
I’ve avoided fx #271 because DLTCEP states it will disable scripting. The dummy creature is equipped with an invisibility ring (MAGE01.itm) and is immune to all kinds of damage and special effects. It also uses a tiny bird animation, in case it might turn visible (for whatever reasons).

 

Do you know the exact percentage HP value when the "HURT" soundset will be triggered? So I could synchronize it with his help shout.

Link to comment

Archived

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

×
×
  • Create New...