Jump to content

How to make an effect delayed without script?


adman85

Recommended Posts

I have an effect that damages health, but I want it to drain much slower than the 1 health per millisecond that it currently drains. (The magnitude doesn't seem to go lower than 1)

 

I tried through conditions but after a while I realised it may not be possible that way, (getsecondspassed won't work in this circumstance, getrandompercent also will just make the entire effect have a chance of failing etc)

 

It is an actor effect (flagged as ability) which is attached to the player via a scripted quest.

 

Is slowing the damage rate in this fashion possible without a script? Also is the speed of damage like this linked to the timescale, or just coded to run at a certain speed?

Link to comment
Share on other sites

Timescale has no effect on gameplay. Also, you must mean 1 per second.

 

There are two methods:

1) Use a script that checks for conditions and getrandompercent, then applies the effect if conditions are met. It's simple and it works.

2) I know an explosion works for radiation; it might for damage as well. More tricky.

Link to comment
Share on other sites

Hey thanks for the replies guys.

 

@FMod

I don't think I'll be able to do it through an explosion, a script would be perfect, but I don't really have one (I know its a really basic script, but I'm just that bad) :whistling: If I did have a script though.. Would I attach it in the conditions section of the effect under "script variable"? Or would I have to run the script through a quest?

 

@davidlallen

Yeah 1 per 5 would be just about perfect really. But how do you mean? Detect time passing through a script function? or is there another way?

Link to comment
Share on other sites

I don't think I'll be able to do it through an explosion, a script would be perfect, but I don't really have one (I know its a really basic script, but I'm just that bad) :whistling: If I did have a script though.. Would I attach it in the conditions section of the effect under "script variable"? Or would I have to run the script through a quest?

So you don't have a script already?

 

Then just add an Actor Effect, in Effects specify DamageHealth, in Conditions there GetRandomPercent < 20, for 1 in 5 seconds. It's that simple. It will work on a per-frame basis, and essentially per-second. I've used it before, it does work, the whole effect doesn't disappear.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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