Jump to content

[LE] Completely Stumped: Why Won't these Spawn?


Recommended Posts

Hey everyone,

 

I've run into what from my angle seems like a very strange circumstance. Please see script below and I'll explain..

 

 

Scriptname ForswornClaimRorikstead extends ObjectReference

Faction Property TownRoriksteadFaction Auto
Faction Property ForswornFaction Auto
ObjectReference Property ForswornRorikSpawn1 Auto
ObjectReference Property ForswornRorikSpawn2 Auto
ObjectReference Property ForswornRorikSpawn3 Auto
ObjectReference Property ForswornRorikSpawn5 Auto
ObjectReference Property ForswornRorikSpawn6 Auto
Quest Property RevengeofReach Auto
Actor Property RorikREF Auto
Actor Property RoriksteadBriarheart Auto
Actor Property ForswornBard Auto
Actor Property JarlTaraket auto
Actor Property Taraket Auto
Event OnDeath(Actor RorikREF)
TownRoriksteadFaction.SetAlly(ForswornFaction)
ForswornRorikSpawn1.enable()
ForswornRorikSpawn2.enable()
ForswornRorikSpawn3.enable()
ForswornRorikSpawn5.enable()
ForswornRorikSpawn6.enable()
JarlTaraket.enable()
RoriksteadBriarheart.enable()
ForswornBard.enable()
Taraket.Disable()
RevengeofReach.SetObjectiveCompleted(30)
RevengeofReach.SetStage(40)
endEvent
I've ensured the properties are pointing to the right places as well. When I kill Rorik, all that happens is the JarlTaraket Actor enables, the quest completes, and nothing else happens. Please someone explain why the spawning points that previously worked now do not work at all...
Link to comment
Share on other sites

You have this script attached to "Rorik", and when "Rorik" dies the script should fire, if so then :
Event OnDeath(Actor akKiller)
    ; Do Stuff
EndEvent
akKiller: The Actor that kills the one how has the script attach to it - himself.
You have "RorikREF" kills "Rorik"...!?!?
Having the script like this "Event OnDeath(Actor akKiller)" will fire no matter who kills "Rorik".
You can use the Event like this :
Event OnDeath(Actor akKiller)
    if (self.GetReference() as Actor)
       ; Do Stuff
    endif
EndEvent
Assign a "akKiller" only if you want the script to fire its functions when the "Death Event" happens after a pre - define Actor Killer.
For example :
Only and when "B" killer > kills "A" victim
* Script attached to "Rorik" and will only fire when player kills him.
Event OnDeath(Actor akKiller)
  if (akKiller == Game.GetPlayer())
    Debug.Trace("Rorik was killed by the player!")
    ; Do Stuff
  endIf
endEvent

 

* Your Script name should be :

Scriptname ForswornClaimRorikstead extends Actor

Edited by maxarturo
Link to comment
Share on other sites

  • Recently Browsing   0 members

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