Shop Example Script

Learn more on how to use Sandbox, or submit your own tutorials or resources.
[gamemaker]
Member
Member
Posts: 3
Joined: August 29th, 2010, 3:36 pm

Re: Shop Example Script

Postby [gamemaker] » August 29th, 2010, 4:09 pm

im new to scripting in sandbox i was wondering if some one would explane how to atach the script to the shop keper so when you walk near him he would talk an bring up the shop menu also how to make quest and rewards for the compleation of the quest thanks

owenisred
Member
Member
Posts: 452
Joined: August 9th, 2010, 9:33 am
Name: Owen

Re: Shop Example Script

Postby owenisred » August 29th, 2010, 4:42 pm

Ask in the support board.
I'm taking modelling requests again - any models you want created,skinned or animated (or all 3) leave a post here:

http://forum.sandboxgamemaker.com/viewtopic.php?f=9&t=2704&start=0

My tutorial site - still under construction, but lots of good stuff there:

http://pasandbox.webs.com/

chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: Shop Example Script

Postby chocolatepie33 » August 29th, 2010, 8:43 pm

I'm not sure what you mean by attach...

To get the shopkeeper to work, you need to place an ogre model (F1, tab 4 or 5, I think), add an invisible model where the ogre is (in the console: / newent mapmodel -1 ) and give it trigger type 11, trigger tag 2 (or whatever the shopkeeper tag is in the script.)
Julius wrote:Contribute to http://www.opengameart.org NOW!

Save the wiki!

daltonds1
Member
Member
Posts: 368
Joined: September 13th, 2010, 12:26 am
Name: Dalton
IRC Username: Daltonds1
Location: Tomball, Texas

Re: Shop Example Script

Postby daltonds1 » October 3rd, 2010, 8:23 pm

This isnt that great if you have 6+ items

User avatar
Leo_V117
Support Team
Support Team
Posts: 1640
Joined: February 16th, 2010, 8:00 pm
Name: Leo
IRC Username: Leo_V117
Location: That one place...
Contact:

Re: Shop Example Script

Postby Leo_V117 » October 4th, 2010, 3:11 am

Shouldnt make much of a difference.

daltonds1
Member
Member
Posts: 368
Joined: September 13th, 2010, 12:26 am
Name: Dalton
IRC Username: Daltonds1
Location: Tomball, Texas

Re: Shop Example Script

Postby daltonds1 » October 4th, 2010, 4:16 pm

it doesnt go down its just a big long line

chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: Shop Example Script

Postby chocolatepie33 » November 27th, 2010, 9:28 pm

Leo_V117 wrote:Quick Note Harrison... Change it to this:

Code: Select all

                 else if ( < $money 10 ) [
                   echo "Sorry, you don't have enough money to buy this!"
                ]


That way it tells you instead of opening a new gui


So wait, Cubescript also has an If... Else function? I thought it was just If... (and that's it).
Speaking of which, is there a switch case function or something similar then?
Julius wrote:Contribute to http://www.opengameart.org NOW!

Save the wiki!

Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: Shop Example Script

Postby Hirato » November 27th, 2010, 11:13 pm

*grumble grumble*
docs are written not to be read
*grumble grumble*
http://sandboxgamemaker.com/wiki/index. ... FDecisions
*grumble grumble*

just keep in mind there's a 25 word limit, the command is the first so you can provide up to 24 additional arguments
This is not a url, clicking it is pointless

chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: Shop Example Script

Postby chocolatepie33 » November 28th, 2010, 6:06 pm

OK, thanks Hirato. Just wondering.
Julius wrote:Contribute to http://www.opengameart.org NOW!

Save the wiki!

dukeJoe
Member
Member
Posts: 1
Joined: January 17th, 2011, 3:55 am
Name: Joe
IRC Username: Joe

Re: Shop Example Script

Postby dukeJoe » January 17th, 2011, 3:59 am

nice one!
Good job fella!.. you had contributed something useful, specially for me.. ;)
______________________________________
gi joe sword -- Our swords shall play the orators for us.


Return to “Tutorials and Resources”

Who is online

Users browsing this forum: No registered users and 1 guest