Jump to content

[LE] Script Event: another NPC spawn upon an NPC’s death


Recommended Posts

Guys, may I ask about how to script the following situation by Creation kit: When I kill an NPC, another NPC is spawned at the dead NPCâs location.

Its similar to the mod Judgemental Wenches (when a Dwemer automation dies a Wench NPC is spawn, and if the Wench NPC is dead another NPC is spawn too)

I know the basic of putting a script into creation kit but I donât know the actual script. Thanks a lot

Link to comment
Share on other sites

You can just attach a script like this to your actor in the creation kit:

Event OnDeath(Actor akKiller) 
    Self.PlaceActorAtMe(Self.GetActorBase()) 
EndEvent

This will place the same NPC that died at its location. To place another NPC you can do:

ActorBase Property MyActorBase Auto

Event OnDeath(Actor akKiller) 
    Self.PlaceActorAtMe(MyActorBase) 
EndEvent

If doing it this way, to forget to fill the MyActorBase property in the creation kit after attaching the script.

Link to comment
Share on other sites

You can just attach a script like this to your actor in the creation kit:Â

 

Event OnDeath(Actor akKiller)Â 
    Self.PlaceActorAtMe(Self.GetActorBase()) 
EndEvent
This will place the same NPC that died at its location. To place another NPC you can do:Â

ActorBase Property MyActorBase Auto

Event OnDeath(Actor akKiller)Â 
    Self.PlaceActorAtMe(MyActorBase) 
EndEvent
If doing it this way, to forget to fill the MyActorBase property in the creation kit after attaching the script.
Link to comment
Share on other sites

You can just attach a script like this to your actor in the creation kit:Â

 

Event OnDeath(Actor akKiller)Â 
    Self.PlaceActorAtMe(Self.GetActorBase()) 
EndEvent
This will place the same NPC that died at its location. To place another NPC you can do:Â

ActorBase Property MyActorBase Auto

Event OnDeath(Actor akKiller)Â 
    Self.PlaceActorAtMe(MyActorBase) 
EndEvent
If doing it this way, to forget to fill the MyActorBase property in the creation kit after attaching the script.

Thanks alot!! Do I need to create a quest with this script or just attach this script directly to this actor? Also this dead actor is spawn actor aswell, so its not placed in the world until certain time. Does this affect the script? Thanks!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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