Difference between revisions of "Talk:A beginner's guide, lesson 7 - Using Scripts in Quests"

Script
imported>DragoonWraith
(→‎Byline: let's try to encourage people to use the Talk page for questions, rather than attempting to privately contact the author.)
imported>Nathnem
(Script)
Line 51: Line 51:
::I think we should write a "how to use the Wiki" guide. Explain things like tags, simple editing, how to go about finding things, where to ask questions, etc etc. I'll think about what we would need and maybe write something up this afternoon.
::I think we should write a "how to use the Wiki" guide. Explain things like tags, simple editing, how to go about finding things, where to ask questions, etc etc. I'll think about what we would need and maybe write something up this afternoon.
::[[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 12:09, 21 August 2007 (EDT)
::[[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 12:09, 21 August 2007 (EDT)
== Script ==
In referance to the script for the hand-holding on the two clue items in the cottage you put:
"Experienced scripter will throw their hands up at the clumsy nature of this bit of the script, but it gets the job done and I believe it is easier to follow the logic of why each line is added in this version.
Perhaps one of the greats will re-write this in a more concise form at some point."
Well I'm not by any means "one of the greats", only picked up the CS two weaks ago but I've been programing for many years and would like to offer a cleaner means too do this.
if (QObjCount < 2)<BR>
    if (Player.GetItemCount "BGPartialLetter" >= 1) && (HaveScroll == 0)<BR>
      set QObjCount to QobjCount + 1<BR>
      set HaveScroll to 1<BR>
      if (HaveAmulet == 0)<BR>
          MessageBox "I have found a torn document. I should continue to look for clues"<BR>
      endif<BR>
    endif<BR>
<BR>
    if (Player.GetItemCount "BGEmbossedAmulet" >= 1) && (HaveAmulet == 0)<BR>
      set QObjCount to QobjCount + 1<BR>
      set HaveAmulet to 1<BR>
      if (HaveScroll == 0)<BR>
          MessageBox "I have found a strange amulet. I should continue to look for clues"<BR>
      endif<BR>
    endif<BR>
<BR>
    if (QObjCount == 2)<BR>
      SetStage BGM001 50<BR>
    endif<BR>
endif<BR>
Anonymous user