Jump to content

Quest is not initialized when called by script.


Recommended Posts

How do I start a quest that is in a separate form (form, not scene), as is done in the base game?
Example: I have the form 'id_RoycellFarrelVendor' which has a dialog that asks if it has any service and the quest it passes is in the form 'id_RoyceFarrelQuest'.
I tried following the quest that Deb from Bunker Hill gives you but replicating the same structure simply doesn't work.

That said, what is the best choice? Put the quest content in a separate scene on the same form or create the quest on a separate form and call it from another form, as done in the base game?

Link to comment
Share on other sites

  • 2 months later...

I am in a similar situation. I do everything the tutorials tell me to but nothing works, UNLIKE in Skyrim where I did some scripting many years ago; without trouble!!!! The compiler has changed , which does not help. This script was corrected by another kind modder, but will only compile for Skyrim. The code is crap, i'm not into object oriented stuff, and for several reasons (I can hardly see the alias ref screen as it needs max display resolution), I cannot set up an alias on the object. :

 

RegisterForUpdate(1,0) Is No Longer Implimented

Event OnUpdate() Is No Longer Implimented - I think that a timer has to be repetedly called - MAD !!!!!

;======================================

Scriptname PlayerSlaveCollarQuestInitScript extends Quest

GlobalVariable Property PlayerCollarIsFound Auto
GlobalVariable Property LockPlayerCollar Auto
Quest Property PlayerSlaveCollarQuest Auto
Armor Property DLC04_ShockCollarPlayer Auto

Event OnInit()
    ;  RegisterForUpdate(1,0)
      Debug.Trace("This quest SCRIPT Init has been done")
    Start()
        PlayerSlaveCollarQuest.SetStage (0 )
        PlayerSlaveCollarQuest.SetStage (10 )
EndEvent

Event OnUpdate()
    PlayerSlaveCollarQuest.SetStage (0 )
    PlayerSlaveCollarQuest.SetStage (10 )
    if ( PlayerCollarIsFound.GetValueInt() == 0 )
        if ( Game.GetPlayer().GetItemCount ( DLC04_ShockCollarPlayer) == 0 )
            RETURN
        endif
        PlayerCollarIsFound.SetValue(1)
        SetStage (30 )
    endif
    if ( Game.GetPlayer().GetItemCount( DLC04_ShockCollarPlayer)== 0 )    ; Player dropped it
        Game.GetPlayer().AddItem( DLC04_ShockCollarPlayer, 1 )
    elseif ( Game.GetPlayer().GetItemCount( DLC04_ShockCollarPlayer) > 1 ); Player picked it up again
        Game.GetPlayer().RemoveItem( DLC04_ShockCollarPlayer, 1 )
    endif
EndEvent

 

Edited by AndyTheSaurus
Link to comment
Share on other sites

  • Recently Browsing   0 members

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