Jump to content

[LE] Events not working


Recommended Posts

Hello, I have a problem here. My Events not working. When i type...

Event OnDying(Actor akKiller)
 Debug.MessageBox("Someone died")
EndEvent

or

Event OnDeath(Actor akKiller)
 Debug.MessageBox("Someone died")
EndEvent

...and in game after kill someone nothing happens. No MessageBox. I tried add condition akkiller == game.getplayer() but without change. I hope there is some solution for this nonsense.

 

In fact i want create a quest in witch one group attack another. After someone die i want use getdeadcount() and after reaching some int i want send second wave.

Link to comment
Share on other sites

It's not clear from your post whether you know this, but those events are only notified about the death of the actor they're attached to. If you want to do something when Bob, specifically, dies, then you need to put the script on Bob somehow.

 

If you did put the script on the right character, then how did you do it?

  • If your script is attached directly to the actor whose death you want to monitor, then don't do that unless that actor is added by your mod. Direct edits to actors can cause conflicts: only the last-loaded set of edits will actually take effect. Use a magic effect or a quest alias instead.

     

  • Quest aliases allow you to attach data to an actor (the one that "fills the alias") for the duration of a quest. You'll want to have your script extend ReferenceAlias and attach the script to the alias. If you use an alias and still can't get it to work, make sure that it's being filled properly (i.e. it can "find" the actor) and that the quest is starting properly. If you need to monitor a specific actor's death, this is the easiest way.

     

  • Magic effects in spells can have scripts attached to them, which can be notified about things that happen to the actor who has the effect. Those scripts should extend ActiveMagicEffect and be attached to a magic effect; that effect should belong to a spell, which you apply to the actor somehow (e.g. a cloak, an alias). If you use a magic effect and still can't get it to work, make sure that the effect is actually being applied (one way is to just give the effect a magic glow and see if that shows up in-game). This approach works best when you need to monitor varying actors, e.g. anyone near the player.
Edited by DavidJCobb
Link to comment
Share on other sites

  • Recently Browsing   0 members

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