Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them. If you have any questions please e-mail me through the Platinum Arts website.

How to make a working quest.

Learn more on how to use Sandbox, or submit your own tutorials or resources.
daltonds1
Member
Member
Posts: 368
Joined: September 13th, 2010, 12:26 am
Name: Dalton
IRC Username: Daltonds1
Location: Tomball, Texas

How to make a working quest.

Post by daltonds1 »

I couldnt get the post working on wiki so i post here


This will show you how to make a quest in sandbox

In this tut i will show how to make a simple quest where you talk to a guy. Then you Pick up a barrel then you take it to another guy.


This is the first we need to do.

Open up your custom map
PlatinumArtsSandbox2.5\my_stuff\packages\base\
If you dont have a .cfg file make a new .cfg file named of your map so if your map name was daltonds you would name it daltonds.cfg

After that add this at the top

Code: Select all

//Picking up items
level_trigger_1 = [
   barrel = (+ $barrel 1)
   echo "You picked up a Barrel"
]
//End Picking up items

To explain

Level Trigger_1 = The level trigger you will set on the barrel so that it can be picked up.
Echo "You picked up a barrel" = Will say this at the top left You picked up a barrel in blue

Now to set a Level trigger on a barrel first spawn a barrel and press . after that a code will come up. Change the 3rd number which would be 0 to 1 and press enter

Now we are going to make the NPC You would like to talk

Under //end picking up items add this

Code: Select all

// Start Quest 

level_trigger_2 = [
   showgui Quest
]

newgui Quest [
   guitext "Hello? Can i help you?" chat
   guibar
   guibutton "Im looking for a quest" "showgui Quest_Yes"
   guibutton "No" "cleargui"
]
newgui Quest_Yes [
   guitext "Alright i think i have one for you..." chat
   guitext "See these barrels behind me?" chat
   guibar
   guibutton "Yes" "showgui Quest_Yes1"
   guibutton "Good bye" "cleargui"
]
newgui Quest_Yes1 [
   guitext "Pick up one for me and take it to my friend" chat
   guitext "Hes over there next to the gates to leave the town." chat
   guibar
   guibutton "Thank you bye" "cleargui"
]

level_trigger_3 = [showgui Guard]

newgui Guard [
   guitext "Hello? Can i help you?" chat
   guibar
   guibutton "I have a item for you." "showgui Guard1"
   guibutton "No" "cleargui"
]

newgui Guard1 [
   guitext "What item is?" chat
   guibar
   guibutton "I have a barrel from a guy i don't know." "showgui Guard2"
   guibutton "I don't know bye" "cleargui"
]

newgui Guard2 [
   guitext "Ok please hand it over." chat
   guibar
   guilist [
      guibutton "Hand over item." [
         if ( > $barrel 0 ) [
            money = ( + $money 20 )
            barrel = ( - $barrel 1 )
       echo "Quest Completed: You earn 20 gold."
           ]
         ]
]
]


//End quest


Now to explain
Again spawn your npc and put the 3rd number which would be 0 to 2 now its 2 this time cause level trigger = 2
Now spawn another NPC some where else and put his level trigger at 3. This is the guy you will be giving the barrel to.

Code: Select all

if ( > $barrel 0 ) [
            money = ( + $money 20 )
            barrel = ( - $barrel 1 )


This mean
if ( > $barrel 0 )
if you have 1 barrel you can finish the quest if you don't you cant
money = ( + $money 20 ) = This will add 20 Gold into your inv
barrel = ( - $barrel 1 ) = this will remove that 1 barrel out of your inv
User avatar
PizzaLover101
Member
Member
Posts: 1751
Joined: October 23rd, 2009, 1:33 pm
Name: NAME
IRC Username: DaItsicle
Location: By a computer
Contact:

Re: How to make a working quest.

Post by PizzaLover101 »

Cool, you really are a helpful person on the SB Forum!
Project 1: Da Chest Collector [TBD]
Project 2: Tis a secret [End of summer] announcement June 22 2011
Project 3: An even bigger secret!

http://pizzagametime.tk/
http://forums.pizzagametime.tk/
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: How to make a working quest.

Post by chocolatepie33 »

PizzaLover101 wrote:Cool, you really are a helpful person on the SB Forum!

I know. He needs to be on support team #2 if we ever get one.

don't forget, once a map is saved, you can edit the .cfg inside sandbox by using F6 in edit mode.
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
Jaso55
Member
Member
Posts: 1
Joined: March 1st, 2011, 9:58 am
Name: jaso
IRC Username: Jaaso

Re: How to make a working quest.

Post by Jaso55 »

This is not working for me at all i followed all of your instructions but the npc is just standing there and you see him only move with his hands and i cant even pick up the barrel and when i press escape for the menu i see no inventory button in it.
I tryed to run also the script with f6 but that didnt work either i just did what you told me like giving the barrel the trigger etc.
But you said it was the (3) Number but when i change that the level trigger isnt changing but the type of it does....
So explain what i did wrong.

{Edit}: And i didnt quite understand you with the cfg file because in what program you need to make it?
i just made it in notepad++ but when i do save as there is no type like cfg so i just putted the file in a normal text file like this: my first map.cfg did i do this good?
daltonds1
Member
Member
Posts: 368
Joined: September 13th, 2010, 12:26 am
Name: Dalton
IRC Username: Daltonds1
Location: Tomball, Texas

Re: How to make a working quest.

Post by daltonds1 »

Jaso55 wrote:This is not working for me at all i followed all of your instructions but the npc is just standing there and you see him only move with his hands and i cant even pick up the barrel and when i press escape for the menu i see no inventory button in it.
I tryed to run also the script with f6 but that didnt work either i just did what you told me like giving the barrel the trigger etc.
But you said it was the (3) Number but when i change that the level trigger isnt changing but the type of it does....
So explain what i did wrong.

{Edit}: And i didnt quite understand you with the cfg file because in what program you need to make it?
i just made it in notepad++ but when i do save as there is no type like cfg so i just putted the file in a normal text file like this: my first map.cfg did i do this good?
Its outdated
qdogbondo
Member
Member
Posts: 3
Joined: January 23rd, 2011, 5:21 pm

Re: How to make a working quest.

Post by qdogbondo »

this is really helpful does this apply to FPS mode ?
arcones
Support Team
Support Team
Posts: 2734
Joined: January 13th, 2010, 12:42 pm
Name: Timothy
IRC Username: I use Steam
Location: Looking over your shoulder...
Contact:

Re: How to make a working quest.

Post by arcones »

In essence it should still work, however, it was made for 2.5 and not 2.6< so there is a possibility of bugs in the script.
Image
Want a user bar like this one? PM Leo!
daltonds1
Member
Member
Posts: 368
Joined: September 13th, 2010, 12:26 am
Name: Dalton
IRC Username: Daltonds1
Location: Tomball, Texas

Re: How to make a working quest.

Post by daltonds1 »

~THIS IS OUTDATED~

I'll update later
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: How to make a working quest.

Post by chocolatepie33 »

good to see you're still around, last I checked there weren't any major differences in the syntax for Cubescripts, the script should work.
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
User avatar
DrChef
Member
Member
Posts: 60
Joined: February 19th, 2010, 5:30 pm
Name: Luis

Re: How to make a working quest.

Post by DrChef »

the trigger type should be 11 for npcs
and 12 for the barrel
:D
Post Reply