Jump to content

Discussion Topic: Script Effects as Timers?


Thumblesteen

Recommended Posts

So, here's something I'm wondering. I've scripted for a while, and, sometimes, timers are irritating. Especially running multiple ones within one gamemode script. So I use a workaround, and make a script effect and execute my timer with CIOS, and then use the ScriptEffectFinish block to run whatever commands I need running when the timer runs out. It's never caused me any bugs or instabilities, and, frankly, I think it might be good for the engine since it requires the game to scan for less conditions.

 

Am I being mad or have I stumbled on to something good here?

Edited by Thumblesteen
Link to comment
Share on other sites

Spells are not reliable in general -

 

From my experience (I might be wrong!) they sometimes dispel when player leaves the cell.

They 100% don't work on NPC who is in another cell.

Also spell script is executed every frame (more cpu load) while with quest script for timer you can set 0.1 delay and nobody will ever notice.

 

 

In I think it might be good for the engine since it requires the game to scan for less conditions.

What conditions?

Link to comment
Share on other sites

If you're only using the ScriptEffectFinish block and there is no ScriptEffectUpdate block, there shouldn't be any performance impact. If the spell is cast on an NPC, it will stop running when the cell containing the NPC is unloaded (it may keep running if the NPC has the Quest Object flag set, not sure about that). There are a few situations in which all spells on the player are dispelled, like at the end of the chargen sequence in Doc Mitchell's house.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...