I've been playing with PlayDead(time) but I can't get it to work how I want it to, which is to have the character drop as if dead and then be ignored by the beasties.
I want to script a character to fake his own death convincingly so that he will be left alone for at least a few seconds, but can't seem to get it to happen the way I want. It doesn't bother me if the character can still be hit by area effects while playing dead, I just don't want him hit by melee or ranged weapons.
Has anyone else played with this one or have any ideas?
PlayDead scripting
Started by Piker, Oct 10 2002 09:17 AM
7 replies to this topic
#1
Posted 10 October 2002 - 09:17 AM
#2
Posted 10 October 2002 - 10:04 AM
You tried the Santuary effect? Look into the Santuary spell as I believe this will do what you want once the character's down. I don't know the spell code offhand, but it's an easy lookup. SPPR1xx something.
The great wolf Fenrir gapes ever at the dwelling of the gods.
#3
Posted 10 October 2002 - 10:42 AM
Thanks for responding :-)
I tried invisibility but haven't tried sanctuary. I was trying to stay away from forcing a spell, but I might declare that battle lost.
I think I will probably end up ReallyForcing an Imm: Div with a modified Sanctuary to accomplish what I want.
Then I have to figure out how to remove the effects at the same time. Bleh.
I would really like it if the NPC would stay down, too, but I can't seem to get him to stay down no matter what value I put in his PlayDead(time). My current best guess is I need to turn off his AI with a script command, but I am not yet sure how to do that. Ideally, I'd also like to make him smart about getting up again - like he only gets up when the center of the fight is elsewhere, or he has either been healed or regenerated enough HPs to be useful again, or the only enemies near him are also badly injured - but again, not really sure how best to do so. I might know how to do this, though I haven't tried to script it fully yet.
I tried invisibility but haven't tried sanctuary. I was trying to stay away from forcing a spell, but I might declare that battle lost.
I think I will probably end up ReallyForcing an Imm: Div with a modified Sanctuary to accomplish what I want.
Then I have to figure out how to remove the effects at the same time. Bleh.
I would really like it if the NPC would stay down, too, but I can't seem to get him to stay down no matter what value I put in his PlayDead(time). My current best guess is I need to turn off his AI with a script command, but I am not yet sure how to do that. Ideally, I'd also like to make him smart about getting up again - like he only gets up when the center of the fight is elsewhere, or he has either been healed or regenerated enough HPs to be useful again, or the only enemies near him are also badly injured - but again, not really sure how best to do so. I might know how to do this, though I haven't tried to script it fully yet.
#4
Posted 10 October 2002 - 01:53 PM
Ok, got it mostly working. It seems I have learned something about IE scripting since I first tried to write that script ;-)
Any tips on how I can remove the 3d effect of Sanctuary?
Any tips on how I can remove the 3d effect of Sanctuary?
#5
Posted 21 October 2002 - 09:25 AM
Completely revamped my Feign Death spell, and made it in a innate ability as opposed to a scripted one.
There are no visible effects other than the invisibility (heh), but the (playable) NPC using the ability is rendered invisible, non-detectable, and unconscious while they regenerate a portion of their HP %. The beasties will leave them alone.
Now, I have one more question. Aside from CTRL-R, is there any way to remove all three effects from an unconscious NPC on command? I want to figure out if I can make him stand up at will from prone position.
Haven't thought of a way to do this yet.
There are no visible effects other than the invisibility (heh), but the (playable) NPC using the ability is rendered invisible, non-detectable, and unconscious while they regenerate a portion of their HP %. The beasties will leave them alone.
Now, I have one more question. Aside from CTRL-R, is there any way to remove all three effects from an unconscious NPC on command? I want to figure out if I can make him stand up at will from prone position.
Haven't thought of a way to do this yet.
#6
Posted 29 October 2002 - 02:20 PM
Does it also protect the PC from the nasty script that the enemies have? I mean the "Detect invisibilty" script?
Rapture EU Alliance guild. Runetotem PvE
Badass raiding mage Retired!
Sneaky backstabbing Rogue in crap gear now!
Rapture WoW video's!
http://video.google....305813616474790
http://video.google....320377682702322
Badass raiding mage Retired!
Sneaky backstabbing Rogue in crap gear now!
Rapture WoW video's!
http://video.google....305813616474790
http://video.google....320377682702322
#7 -Gebhard Blucher-
Posted 28 November 2002 - 08:57 PM
You could also try using the "Protection from Creature Type" opcode. I was playing around with this once (trying to create a spell protecting a caster from elementals), but I couldn't figure out the correct value for elementals. Seems all of the values I tried protected the character from everything. That didn't work for me, but seems like it'd be perfect for you. (When making the spell, just pick any unknown value and chances are it will protect against everything.)
Scripts will still run, so once the character regains the desired HPs, the script can ApplySpell(Myself,AnotherCustomSpell), where "AnotherCustomSpell" removes the protection granted earlier.
So two custom spells would be needed, one granting the protection and another removing the protection (or you could just time the first to expire when desired).
As Michel mentioned, invis/sanctuary doesn't protect against monsters able to see the invisible.
Scripts will still run, so once the character regains the desired HPs, the script can ApplySpell(Myself,AnotherCustomSpell), where "AnotherCustomSpell" removes the protection granted earlier.
So two custom spells would be needed, one granting the protection and another removing the protection (or you could just time the first to expire when desired).
As Michel mentioned, invis/sanctuary doesn't protect against monsters able to see the invisible.
#8 -Zvijer-
Posted 11 December 2002 - 11:33 AM
I think it would be more real if Mind Flayers, Demons, and others could see through the ruse and know NPC is not dead, and be able to attack him.
Of course, NPC should "wake" upon suffering damage, or he would be done for, and it would be rather pointless to have such an ability.
Of course, NPC should "wake" upon suffering damage, or he would be done for, and it would be rather pointless to have such an ability.