adman85 Posted December 19, 2011 Share Posted December 19, 2011 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 More sharing options...
FMod Posted December 19, 2011 Share Posted December 19, 2011 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 More sharing options...
davidlallen Posted December 19, 2011 Share Posted December 19, 2011 Do you want to inflict one damage per five seconds? You can easily detect when five seconds have passed, and then inflict the damage and reset the timer. Link to comment Share on other sites More sharing options...
adman85 Posted December 19, 2011 Author Share Posted December 19, 2011 Hey thanks for the replies guys. @FModI 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? @davidlallenYeah 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 More sharing options...
FMod Posted December 19, 2011 Share Posted December 19, 2011 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 More sharing options...
adman85 Posted December 19, 2011 Author Share Posted December 19, 2011 Oh my god.. I can't believe I just assumed that it would go the other way. I apologise for wasting time. Thanks you so very much, kudos sent, much appreciated :dance: Link to comment Share on other sites More sharing options...
Recommended Posts