Jump to content

Playing with aliases, ForceRefTo, and OnDeath


jimhsu

Recommended Posts

Trying something non serious, but wacky fun. But here's the setup:

 

1. A single actor in the world is initialized with, say, a disease (with a ReferenceAlias script).

2. SetAV aggression 3 and hilarity ensues.

3. OnDeath of that actor, infect the killer of that actor with the disease (with say some probability).

4. SetAV aggression 3 and hilarity ensues, again.

5. OnDeath of the second actor .. so on and so forth. Eventually the whole of skyrim goes insane (probably) unless I intervene.

 

The problem I am having with the script in the Reference Alias panel is that while I get the alias handoffs just fine (with ForceRefTo), I can't get the alias script to run on the 2nd actor (so OnDeath doesn't work on step 5). Is this at all possible or should I use a different approach? Bear in mind that the killer can be ANY actor, so obviously having OnDeath scripts for every actor in the game is not practical.

Link to comment
Share on other sites

The OnDeath() event can be used in magic effect, it will detect the actor that has that magic effect. For what you are trying to do I think it's the best way.

 

If the magic effect is dispelled on death I recommend you to use the OnDying() event instead.

Edited by pauderek
Link to comment
Share on other sites

Oh, I neglected to read the final line from the Creation Kit wiki:

 

"ActiveMagicEffects will also receive events from the Actor they are attached to. "

 

Interesting. Will try this out.

Edited by jimhsu
Link to comment
Share on other sites

  • Recently Browsing   0 members

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