Jump to content

Scripting Problem: Fire and Forget spell script that counts up


ZeroCore

Recommended Posts

Here's what I'm trying to do: I'm trying to make a script for a fire and forget spell that, when activated, will begin to count upward to a specific number and then stop.

 

The idea of it is something like this:

 

Spell is cast

spell's count starts at zero

after the spell is cast, the script continues to run and begins to count upward

the count gets incremented until it hits a certain number

then it stops and the spell's script ends.

 

If anyone could give me a few pointers on how to do this, I'd appreciate it as I still can't figure out how to get a script to function continuously in a spell. I tried making a concentration spell that would count up, but the script that's initiated by an "Event OnEffectStart" only resolves once.

 

I had thought of something like this

 

ScriptName CounterScript extends ActiveMagicEffect

 

int Property counter = 0

 

Event onEffectStart(Actor akTarget, Actor akCaster)

 

while ( counter < 10 )

counter += 1

endWhile

 

EndEvent

 

The idea behind this was to eventually make a spell that could "charge up" and then release a very large, VERY powerful explosion in a radius around the player. I had planned on sticking this to a greater power that the player could learn from a spell tome that would be acquired at the end of a quest.

 

I, admittedly, haven't tested this script, so I have no idea if it will work or not.

Edited by ZeroCore
Link to comment
Share on other sites

  • Recently Browsing   0 members

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