Difference between revisions of "Ultimate Simple script guide part2"

From Platinum Arts Sandbox Free 3D Game Maker
Jump to: navigation, search
(Created page with 'Part 2; Created by Chocolatepie33 with assistance from Kentl. For 2.5 (for now, 2.6 changes will be made.) *Creating multiple pop-up windows for an NPC **We've sort of talked ab…')
 
Line 4: Line 4:
 
**We've sort of talked about this, but here's the specific code:
 
**We've sort of talked about this, but here's the specific code:
 
     level_trigger_1 = [showgui npc1-1]
 
     level_trigger_1 = [showgui npc1-1]
     newgui npc1-1 [        // 1-1 is window 1
+
     newgui npc1-1 [         
 
     guitext "Hi."
 
     guitext "Hi."
 
     guibar
 
     guibar
     guibutton "How are you?" [showgui npc1-2] // 1-2 is window 2
+
     guibutton "How are you?" [showgui npc1-2]  
 
     guibutton "Goodbye." [cleargui]
 
     guibutton "Goodbye." [cleargui]
 
     ] "Jon"
 
     ] "Jon"
Line 18: Line 18:
 
     newgui npc1-3 [
 
     newgui npc1-3 [
 
     guitext "Do you like chocolate, vanilla or strawberry ice cream?"
 
     guitext "Do you like chocolate, vanilla or strawberry ice cream?"
     guibar // now we're gonna do 3 different window choices, each affected by the answer.
+
     guibar  
     guibutton "Chocolate" [showgui npc1-4] // you could also do npc2-1, 3-1 and 4-1, if you want.
+
     guibutton "Chocolate" [showgui npc1-4]  
 
     guibutton "Vanilla" [showgui npc1-5]
 
     guibutton "Vanilla" [showgui npc1-5]
 
     guibutton "Strawberry" [showgui npc1-6]
 
     guibutton "Strawberry" [showgui npc1-6]
 +
    guibutton "None. Goodbye." [cleargui]
 +
    ] "Jon"
 +
    newgui npc1-4 [
 +
    guitext "Yes! I do too! Let's go eat some at the Ice Cream Shoppe!"
 +
    guibar

Revision as of 19:08, 19 October 2010

Part 2; Created by Chocolatepie33 with assistance from Kentl. For 2.5 (for now, 2.6 changes will be made.)

  • Creating multiple pop-up windows for an NPC
    • We've sort of talked about this, but here's the specific code:
    level_trigger_1 = [showgui npc1-1]
    newgui npc1-1 [        
    guitext "Hi."
    guibar
    guibutton "How are you?" [showgui npc1-2] 
    guibutton "Goodbye." [cleargui]
    ] "Jon"
    newgui npc1-2 [
    guitext "I'm doing well. What about you?" 
    guibar
    guibutton "Fine, fine." [showgui npc1-3]
    guibutton "Okay, could be better. See ya later." [cleargui]
    ] "Jon"
    newgui npc1-3 [
    guitext "Do you like chocolate, vanilla or strawberry ice cream?"
    guibar 
    guibutton "Chocolate" [showgui npc1-4] 
    guibutton "Vanilla" [showgui npc1-5]
    guibutton "Strawberry" [showgui npc1-6]
    guibutton "None. Goodbye." [cleargui]
    ] "Jon"
    newgui npc1-4 [
    guitext "Yes! I do too! Let's go eat some at the Ice Cream Shoppe!" 
    guibar