Adding NPC's and items to your map

From Platinum Arts Sandbox Free 3D Game Maker
Jump to: navigation, search

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

//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.

//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.

//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.

//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
  • ^fr - End of Text

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.

//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.

//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.