Jump to content

Starting a quest on Item pick up script?


fdrf

Recommended Posts

Hi all I am new to geck modding and am trying to make my first quest. I want the quest to start when the player picks up an item. I have looked around but have only found tutorials on starting a quest when the player steps in a trigger. I am not getting any error messages the quest just does not start when I pick the item up. This is my current script:

scn 00MarkQuest

begin onadd

if getcontainer == player

if getstage 00MarkQuest > 10

startQuest 00MarkQuest

setstage 00MarkQuest 10

endif

endif

end

Any help would be appreciated.

Link to comment
Share on other sites

I would image it's the getstage that's making it so it doesn't run, as the value would be 0 or null. Instead have a DoOnce varible.

 

Something like this:

 
scn 00MarkQuestScript
 
int DoOnce
 
Begin OnAdd
 
if GetContainer == Player

if DoOnce == 0
 
StartQuest 00MarkQuest
 
SetStage 00MarkQuest 10
 
Set DoOnce to 1

endif
 
endif

end
 
Edited by JJ2198
Link to comment
Share on other sites

The problem is that you started the EditorID of your quest with a numerical value. You cannot pass such EditorIDs to scripting functions, so don't name them in that manner.

 

You can sort the object window by FormID instead, which will place all of your plugin's forms at the top of the list in descending order.

Link to comment
Share on other sites

Just did a quick test and it was fine with using numbers at the beginning of a quest ID. The problem is he has a condition that will only work if the quest stage is greater than 10, though since it hasn't even started it will be 0.

Edited by JJ2198
Link to comment
Share on other sites

The problem is that you started the EditorID of your quest with a numerical value. You cannot pass such EditorIDs to scripting functions, so don't name them in that manner.

Only reference IDs should never start with numbers. It's fine with editor IDs.

Link to comment
Share on other sites

 

The problem is that you started the EditorID of your quest with a numerical value. You cannot pass such EditorIDs to scripting functions, so don't name them in that manner.

Only reference IDs should never start with numbers. It's fine with editor IDs.

 

If that's so, I stand corrected. Still a bad practice, however.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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