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.

Adding NPC's and items to your map

Learn more on how to use Sandbox, or submit your own tutorials or resources.
User avatar
Chaze007
Member
Member
Posts: 318
Joined: August 9th, 2009, 8:56 pm
Name: William
IRC Username: Chaze007
Location: MS

Adding NPC's and items to your map

Post by Chaze007 »

This tutorial will teach you how to make basic GUI code. This code basically allows NPCs and stuff to talk.

Code: Select all

//Test GUI
 newgui diologue1 [
        guitext "Hello, this is where the text is entered." chat
 ]   "Hello, this is the title"
As you can see above, everything is writen in a neat fashion.
newgui - Tepresents a new GUI window, where your character will speak.
newgui diologue1 - The diologue1 text is the name of your gui window.
guitext - This represents what the character will say. Always make sure to put quotations (" ") around the text, and "chat" without quotations, at the ending.
The very last line, after the closing bracket represents the title that will appear at the top of your GUI window.

Let's move on to something more advanced.

Code: Select all

 //Test GUI
 newgui diologue2 [
 	guitext "First line of text!" chat
 	guitext "Second line of text!" chat
 	guitext "Third line of text!." chat	
 ]   "Lines of text
."

Adding more lines can make your diologue longer. Keep this in mind when explaining something big in your map.

Code: Select all

//Test GUI
 newgui diologue3 [
 	guitext "^fs^f0Hello, I am green text^fr" chat
 ]   "Green Text"
Adding color tags allow you to color text
The ^fs represents the starting point basically, of where your colored text will be.
The ^f0 is the color of your text, 0 being green.
The ^fr represents the ending point of your text.
These combined allow for scattered colored text.

Code: Select all

 //Test GUI
 newgui diologue4 [
 	guitext "^fs^f0Hello^fr, I am ^fs^f1blue^fr, no wait! ^fs^f3RED!^fr." chat
 ]   "Colored Text"
Here is the full list of different colored text.
^f0 - Green
^f1 - Blue
^f2 - Yellow
^f3 - Red
^f4 - Gray
^f5 - Magneta
^f6 - Oramge
^f7 - White

^fA - Apricot
^fB - Brown
^fC - Corn
^fD - Dodger Blue
^fE - Emerald
^fF - Fuchsia
^fG - Gold
^fH - Heliotrope
^fI - Indigo
^fJ - Jade
^fK - Khaki
^fL - Lemon
^fM - Mint
^fN - Navajo White
^fO - Olive
^fP - Pink
^fR - Rose
^fS - Silver
^fT - Turqoise
^fU - Ultramarine
^fV - Violet
^fW - Wheat
^fY - Yellow
^fZ - Zinnwaldite

^fs - Start of Text
<li>^fr - End of Text</ul>

These allow for a combination of brilliant colors if used in the correct manner.
Next I will show you how to execute your GUI, and make an item for your map.

Code: Select all

//Diologue Triggers
 level_trigger_1 = [showgui diologue1; sound $select]
the level trigger chooses which tag your npc will have. As you can see it's told in the action to show the GUI of diologue1, and to play a sound.

Code: Select all

 //Item Triggers
 level_trigger_2 = [jumpvel 600; sound $eatapple; showgui eatapple; echo "You've eaten an apple! You can now jump HIGHER!"]
As you can see here, this is something you'd most likely assign to be an item, the action tells it to increase the jumping velocity, to play a sound, to show a GUI, and to show text in the top left corner.

Mixing these unique functions can make for an exciting map. We hope this tutorial helped you in your troubles.
Last edited by Chaze007 on June 25th, 2010, 2:51 am, edited 1 time in total.
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: Adding NPC's and items to your map

Post by arcones »

Ahh, thanks Chaze!

The jump vel change at the end is very helpful :)
Image
Want a user bar like this one? PM Leo!
User avatar
GR1M
Support Team
Support Team
Posts: 1305
Joined: August 22nd, 2009, 4:35 pm
Name: Luke
IRC Username: Gr1m
Location: Texas
Contact:

Re: Adding NPC's and items to your map

Post by GR1M »

Level_trigger_1 = (echo "I liked the tutorial please provide more!")
Image
Want a user bar like this one? PM Leo
User avatar
Chaze007
Member
Member
Posts: 318
Joined: August 9th, 2009, 8:56 pm
Name: William
IRC Username: Chaze007
Location: MS

Re: Adding NPC's and items to your map

Post by Chaze007 »

Lol, in due time, in due time.
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: Adding NPC's and items to your map

Post by arcones »

SUPPORT TEAM! That's one vote :D
Image
Want a user bar like this one? PM Leo!
User avatar
Chaze007
Member
Member
Posts: 318
Joined: August 9th, 2009, 8:56 pm
Name: William
IRC Username: Chaze007
Location: MS

Re: Adding NPC's and items to your map

Post by Chaze007 »

I used to be a mod around here ;D but them I got inactive ):
User avatar
InHumanUnit
Member
Member
Posts: 1450
Joined: May 22nd, 2010, 7:23 am
Name: Ian, Haiku, I got alot ;)
Location: Toyko, Japan. Currently in Illonis, Round Lake in America for secret purposes
Contact:

Re: Adding NPC's and items to your map

Post by InHumanUnit »

Where do I put it?
Image
Image
Image
XEON BOX GAMES - XBG is a blast from the past of a pirate mast to a cars thats fast.
You dare challenge me to Halo:Reach? You must die!
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: Adding NPC's and items to your map

Post by PizzaLover101 »

IHU, check out this tutorial that I made:

viewtopic.php?f=24&t=1532
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/
User avatar
InHumanUnit
Member
Member
Posts: 1450
Joined: May 22nd, 2010, 7:23 am
Name: Ian, Haiku, I got alot ;)
Location: Toyko, Japan. Currently in Illonis, Round Lake in America for secret purposes
Contact:

Re: Adding NPC's and items to your map

Post by InHumanUnit »

Thanks, my sister is currently testing my game, she can't get past the first trap. LOL!!!
Last edited by InHumanUnit on August 4th, 2010, 8:22 pm, edited 1 time in total.
Image
Image
Image
XEON BOX GAMES - XBG is a blast from the past of a pirate mast to a cars thats fast.
You dare challenge me to Halo:Reach? You must die!
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: Adding NPC's and items to your map

Post by chocolatepie33 »

Nice tutorial, I vote for you on support team.
I was wondering... What's the bakerspeak in the village map do, and everything? I know it has to do with the text particle, but I'm lost...
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
Post Reply