Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Quest Script


mjab_flame_kill
 Share

Recommended Posts

I have been trying to create a new simple script for moving on to a new stage after 5 have been completed however i have been unsuccessful so far.  What I have so far:

Scriptname AAQuestSetStage40 extends Quest  
 
Quest Property AAQuest  Auto
 
Event OnActivate (ObjectReference akActionRef)
 
  if (AAQuest.GetStageDone(31)) && (AAQuest.GetStageDone(32)) && (AAQuest.GetStageDone(33)) && (AAQuest.GetStageDone(34)) && (AAQuest.GetStageDone(35))
  endIf
   (AAQuest.SetStage(40))
endEvent
 
I have attached this to two places, the spell which you get after getting to stage 40 and the script tab under the quest that it is being created for.  Any help would be appreciated! XD 

 

Link to comment
Share on other sites

The event 'OnActivate' implies the player is interacting with something. So your script will never run since a spell or quest will never kick off the OnActivate block.

I don't script for quests, but I would guess you would add the script to dialog or something else.

Link to comment
Share on other sites

OnInit only runs once, when the object the script is attached to is initialized.

Depending on how you have the quest setup, you might look into OnUpdate instead.

Such as:

Event OnInit()
registerForUpdate(1)
EndEvent

Event OnUpdate()
'do your code
EndEvent
Link to comment
Share on other sites

sadly that doesn't work it just starts that stage whenever i open i new save or game.

Scriptname AAQuestSetStage40 extends Quest  
 
Quest Property AAQuest  Auto
 
Event OnInit()
registerForUpdate(1)
EndEvent
 
Event OnUpdate()
 if (AAQuest.GetStageDone(31)) && (AAQuest.GetStageDone(32)) && (AAQuest.GetStageDone(33)) && (AAQuest.GetStageDone(34)) && (AAQuest.GetStageDone(35))
 endIf
   (AAQuest.SetStage(40))
EndEvent
Link to comment
Share on other sites

Its because your telling it to set the stage, no matter what quest stage has been completed yet.

You need to put the setStage code inside your IF condition. Then you need to unregister it for updates since it did its thing.

Event OnUpdate()
if AAQuest.GetStageDone(31) && AAQuest.GetStageDone(32) && AAQuest.GetStageDone(33) && AAQuest.GetStageDone(34) && AAQuest.GetStageDone(35)
    AAQuest.SetStage(40)
    UnregisterForUpdate()
endIf
EndEvent
Link to comment
Share on other sites

Are you sure its running? Your using a clean save game?

 

I wonder about the AAQuest.GetStageDone command. Does it recognize all those stages as done for the same quest or will it only work for one quest stage per quest?

 

Anyway, you might need to do something different there if its never possible to be true.  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...