Difference between revisions of "Bethsoft Tutorial Basic Quest"

m
no edit summary
imported>DragoonWraith
m (Vault134 moved to Bethsoft Tutorial Basic Quest over redirect: moving back)
imported>Garin
m
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Getting Started]]
[[Category:Getting Started]]
[[Category:Tutorials]]
[[Category:Tutorials]]
[[Category:Quests]]
[[Bethsoft_Tutorial_Finalize_and_Connect|<<<BACK]]
[[Bethsoft_Tutorial_Finalize_and_Connect|<<<BACK]]
==Quest Logic Primer==
==Quest Logic Primer==
Line 80: Line 82:
*'''scn''' - This is shorthand for [[Scriptname]].  Just as we have to give any new base ID a unique name, this is the unique ID of this script - in this case '''"VT74stage10triggerSCRIPT'''"
*'''scn''' - This is shorthand for [[Scriptname]].  Just as we have to give any new base ID a unique name, this is the unique ID of this script - in this case '''"VT74stage10triggerSCRIPT'''"
*'''begin [[onTriggerEnter]] player''' - this begins an "[[onTriggerEnter]]" block.  [[:Category:Blocktypes|Blocktypes]] give scripters a number of ways to capture game events.  In this case, we're going to capture when the player steps into a trigger we'll be creating soon.  The optional ''"player"'' parameter let's us specify that we only care when the player enters this trigger.
*'''begin [[onTriggerEnter]] player''' - this begins an "[[onTriggerEnter]]" block.  [[:Category:Blocktypes|Blocktypes]] give scripters a number of ways to capture game events.  In this case, we're going to capture when the player steps into a trigger we'll be creating soon.  The optional ''"player"'' parameter let's us specify that we only care when the player enters this trigger.
*'''if [[GetStage]] VT74 < 10''' - This is an '''"if statement"''', a common element in programming logic.  Here we're checking to see if the current stage of our Quest (VT74) is less than or equal to 10.  We know that the first time the player enters this trigger, this statement ''"getStage VT74<10"'' will be true, because stage 10 hasn't been set.  Once we set VT74's stage to 10 or higher, the statement ''"getStage VT74<10"'' will be false, meaning any script between this "if" and the next "endif" will be skipped over.
*'''if [[GetStage]] VT74 < 10''' - This is an '''"if statement"''', a common element in programming logic.  Here we're checking to see if the current stage of our Quest (VT74) is less than 10.  We know that the first time the player enters this trigger, this statement ''"getStage VT74<10"'' will be true, because stage 10 hasn't been set.  Once we set VT74's stage to 10 or higher, the statement ''"getStage VT74<10"'' will be false, meaning any script between this "if" and the next "endif" will be skipped over.
*'''[[setStage]] VT74 10''' - This script command sets the stage of VT74 to 10.  We know that this will give the player the quest objective we've already created, and means that any time the player hits this trigger in the future, the previous "if" statement will be false, preventing this line of script from running again.
*'''[[setStage]] VT74 10''' - This script command sets the stage of VT74 to 10.  We know that this will give the player the quest objective we've already created, and means that any time the player hits this trigger in the future, the previous "if" statement will be false, preventing this line of script from running again.
*'''endif''' - This closes the preceding '''"if"''' statement, and tells the script where to resume if the if check was false.
*'''endif''' - This closes the preceding '''"if"''' statement, and tells the script where to resume if the if check was false.
Anonymous user