Jump to content

Photo

Area of Effect Spell that affects Corpses

corpses corpse spell area areaofeffect area of effect archetype

  • Please log in to reply
12 replies to this topic

#11
BotOwned

BotOwned

    Regular

  • Account closed
  • PipPip
  • 95 posts

Solution to problem:
 

Spell Property DetectDead auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
	RegisterForUpdate(3.0)
EndEvent

Event OnUpdate()
	DetectDead.Cast(Game.GetPlayer())
EndEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)
	UnRegisterForUpdate()
EndEvent

 

 Upon finding the rather elegant RegisterForUpdate(float x) function and OnUpdate() Event the rest fell into place. A little fiddling will do the rest. Thanks steve40 for the idea to cast a spell repeatedly every two seconds!!

This still does not create a complete work around for my initial problem, though. Creating spells that affect corpses without directly aiming at them (i.e. by only having them in the area)  seems to be quite difficult without using the "detect life" archetype... Any advice on that or examples of spells that affect corpses without aiming at them would be appreciated. 

That said, my current spell idea can be accomplished with no further input. Thank you all!

 

Personally I use RegisterForSingleUpdate(float x) then RegisterForUpdate(float x) as it sometimes is possible for the update to become orphaned even with the best of scripts and using a single update only will allow the update to run out in case unregister fails.



#12
mathern

mathern

    Journeyman

  • Members
  • Pip
  • 25 posts

Personally I use RegisterForSingleUpdate(float x) then RegisterForUpdate(float x) as it sometimes is possible for the update to become orphaned even with the best of scripts and using a single update only will allow the update to run out in case unregister fails.


 

I'll take that into account. Thanks!



#13
steve40

steve40

    A slow-boiling frog that eventually jumped.

  • Premium Member
  • 7,548 posts
It's safer to use RegisterForSingleUpdate:
Spell Property DetectDead auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
	RegisterForSingleUpdate(3.0)
EndEvent

Event OnUpdate()
	RegisterForSingleUpdate(3.0)
	DetectDead.Cast(Game.GetPlayer())
EndEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)
	Game.GetPlayer().DispelSpell(DetectDead)
EndEvent

Edited by steve40, 14 May 2013 - 10:29 am.






Also tagged with one or more of these keywords: corpses, corpse, spell, area, areaofeffect, area of effect, archetype

IPB skins by Skinbox
Page loaded in: 0.778 seconds