- Messages
- 4,449
This sub forum is quite lonely. I'll add the first post to it. Does that make me special?
Anyway, I'm trying to wrap my head around creating a 'master' quest script. (Script tab of the quest) It is pretty simple and straight forward to use fragments. I'm trying to learn how to move all this into one script.
So far this is the general layout I have come up with:
Is this the proper way to do this? Is there a better way? Or do I just use fragments?
If the previous code is proper, how do you add events to it. i.e. There is a note where the player reads it and sets a stage. The Player reads an entry in a holotape and it sets a stage. The Player picks up an item and it sets a stage. Are these better left in fragments?
And finally, calling a function I made from a fragment. I search and still can't wrap my head around it and the compiler is starting to wear out from my numerous attempts.
What is the proper syntax for calling myFunction() in the namespace myMod:myQuest with the script name myQuestControllerScript? Can this be done from a fragment?
Thanks in advance for the help!
Anyway, I'm trying to wrap my head around creating a 'master' quest script. (Script tab of the quest) It is pretty simple and straight forward to use fragments. I'm trying to learn how to move all this into one script.
So far this is the general layout I have come up with:
QuestControllerScript Extends Quest
;Properties... blah blah
Event OnSetStage(iStage)
if (iStage == 10)
;stuff happens
Elseif (iStage == 20)
;other stuff happens
Elseif (iStage == 30)
;even more stuff happens
Endif
EndEvent
Function myFunction ()
;my function stuff happens
EndFunction
If the previous code is proper, how do you add events to it. i.e. There is a note where the player reads it and sets a stage. The Player reads an entry in a holotape and it sets a stage. The Player picks up an item and it sets a stage. Are these better left in fragments?
And finally, calling a function I made from a fragment. I search and still can't wrap my head around it and the compiler is starting to wear out from my numerous attempts.
What is the proper syntax for calling myFunction() in the namespace myMod:myQuest with the script name myQuestControllerScript? Can this be done from a fragment?
Thanks in advance for the help!