Effects on Actors by script

Post » Thu Feb 14, 2013 1:52 am

For most people possible a old and easy thing, but i tried it now for some time, but it never worked independent what i tried.
After playing a bit of the Dawnguard DLC, who never worked before for me (i actually found a bad script from a mod, so its working now), i found a poison plant, who triggered an effect on itself. So i tought i rebuild it to test the effects. But seems it doesn't worked.


Property Name: TrapPoisonGasixplosion01
Type: Explosion
Value: TrapPoisonGasixplosion01 (000A036F)

Scriptname effecttest extends Actor

explosion property TrapPoisonGasixplosion01 auto

Event OnLoad()

registerForSingleUpdate(5)

endevent

Event OnUpdate()

placeAtMe(TrapPoisonGasixplosion01)

registerForSingleUpdate(5)

EndEvent

So this isn't working at all, i know after testing with some other testing outputs, that the loop is working. Made one for testing, that i don't have to trigger the whole thing and can look, if it works with some trys and that i don't miss it.

As first problem, i thought it could be the position of it. But i tought aswell, that if i don't have an object reference for placeatme, that it uses the object where the script is in. So i tried it with game().player().placeatme to test it on me directly. Nothing worked aswell. So that doesn't seems to be the problem.
So what i think is, that i didn't triggered the explosion correctly. I took many of the stuff from the poisonplant to test it, but donno if i read everything correct in the script, or have overseen something.

So another question.

Is there a way to trigger the effect directly? So not rezzing it, yust playing it. I know this was possible in Oblivion and aswell Fallout.
But haven't found an function who make exactly this in Skyrim. Only to make some checks about it.
User avatar
KRistina Karlsson
 
Posts: 3383
Joined: Tue Jun 20, 2006 9:22 pm

Return to V - Skyrim