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.

In the meantime please join the new Discord Server!

If you have any questions please e-mail me through the Platinum Arts website.

Help with npcs/quests.

Having issues not related to a specific Sandbox game mode? Get help here!
Please also read the rules for support when posting support requests.
Failure to comply with the forum rules may result in your topic being locked without resolution.
christopha
Member
Member
Posts: 8
Joined: July 10th, 2011, 8:33 pm
Name: chris

Help with npcs/quests.

Post by christopha »

How do I get the NPC's to talk and give out quests? I've been trying to find an answer that I understand but unfortunately everything I try doesn't work or doesn't help me understand what I am doing wrong. Any kind of advice would be much appreciated.
User avatar
jSoftApps
Member
Member
Posts: 426
Joined: May 2nd, 2011, 10:02 pm
Name: J.R.
IRC Username: jSoftApps
Location: jSoft Apps Software Innovations HQ
Contact:

Re: Help with npcs/quests.

Post by jSoftApps »

Try reloading your map in sp mode
jSoft Apps Software Innovations - App, Games and More!
Visit our Website!

Image

jSoft Apps is now on indie db!
Image
christopha
Member
Member
Posts: 8
Joined: July 10th, 2011, 8:33 pm
Name: chris

Re: Help with npcs/quests.

Post by christopha »

I tried that but still nothing happened. Do I need to code for interactions or should it just happen?

Code: Select all

  ]
    //End Picking up items
    // 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

That's what I used. I got it from another tutorial on here.
christopha
Member
Member
Posts: 8
Joined: July 10th, 2011, 8:33 pm
Name: chris

Re: Help with npcs/quests.

Post by christopha »

Code: Select all

   //Picking up items
    level_trigger_1 = [
       barrel = (+ $barrel 1)
       echo "You picked up a Barrel"
Goes at the very beginning.
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: Help with npcs/quests.

Post by chocolatepie33 »

are you in fps or rpg mode? rpg mode has an entirely different format for scripting.

the code looks like it should work, I don't know why it wouldn't. You did use F6 in edit mode, load that, then execute it, right?
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
christopha
Member
Member
Posts: 8
Joined: July 10th, 2011, 8:33 pm
Name: chris

Re: Help with npcs/quests.

Post by christopha »

Yes, I am in rpg mode and I did load it using F6.
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: Help with npcs/quests.

Post by arcones »

There's your problem. FPS mode, like CP said, is an entirely different beast. I'd recommend starting with FPS since that's the scripting you're doing already.
Image
Want a user bar like this one? PM Leo!
christopha
Member
Member
Posts: 8
Joined: July 10th, 2011, 8:33 pm
Name: chris

Re: Help with npcs/quests.

Post by christopha »

Okay. Thank you!
christopha
Member
Member
Posts: 8
Joined: July 10th, 2011, 8:33 pm
Name: chris

Re: Help with npcs/quests.

Post by christopha »

I tried it out in fps mode did everything exactly how I did it in rpg (loaded it up with F6 and executed it and reloaded it in sp mode) and nothing happened still. D:
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: Help with npcs/quests.

Post by arcones »

1: Are you in Single Player mode, or another mode (inside FPS)?
2: Are you saving your script, and then closing the page, or merely closing your page?
3: Do you have mapmodels with the correct triggers placed around the map?
Image
Want a user bar like this one? PM Leo!
Locked