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

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.
Locked
User avatar
shadow09231990
Member
Member
Posts: 9
Joined: September 1st, 2009, 1:04 am
Name: kyle

help

Post by shadow09231990 »

im having trouble with getting a few things to work in my map. the first thing is im trying to make some basic quests: the first quest is to collect 5 keys of "the gods". the second is im trying to make it so you have a princess.
another problem is im trying to make it so you have to collect the 5 keys in order to open one door
(to gain access to the princess), but i dont know how to. the following is my .cfg

Code: Select all

//aliases

"on_start" = [
money = 0
wolf = 0
keys = 0
totalkeys = 0
totalprincess = 0
pickedkey1 = 0 
keyquests = 0 
doorquest = 0 
finishedquests = 0 
totalquests = 0 
money = 0 
finisheddoor1 = 0
]

mmodel "rpg/characters/wolf"

mmodel "rpg/objects/coin/silver"

mmodel "rpg/characters/npcman"

music burn.ogg

loop i 5 [
		(format "gotkey%1" (+ $i 1)) = 0
	]

mapsound "freesound/FamilyGuy_StewieInsult" 255 32767 // 5
mapsound "freesound/FamilyGuy_StewieSickTwistedFruit" 255 32767 // 6


//aliases


"level_trigger_1" = [ money = ( + $money 5 ) 
echo "You got 5 money."
]

newgui main [
guilist [
guilist [
guibutton "Quest information" "showgui quests"
guibutton "Inventory" "showgui Inventory"
]
]
guibar
@main
]

newgui Inventory [
guibutton "Back" "cleargui 1"
guibar
guitext ( format "You have %1 moneys in your wallet." $money )
guitext ( format "You have %1 wolf." $wolf)
guitext (format "You currently carry %1 keys" $totalkeys)
guibar
newgui quests [
		guibutton "Back" "cleargui 1"
		guibar
		guitext (format "You've obtained %1 out of 2 quests" $totalquests)
		guitext (format "You've finished %1 out of 2 quests" $finishedquests)
		guibar
		guitext (format "You've obtained %1 out of 5 keys" $totalkeys)
		guitext (format "You've obtained %1 out of 1 princess" $totalprincess)
	]
]
	newgui quest1 [
		if ( (> $keys 0) (= $pickedkeys1 2))
		guibar 
		if $pickedkeys1 [
			guitext "where could those keys be"
			guitext "i still need to collect %1 more keys to save the princess"
		]
	] "the gods keys"

	newgui quest2 [
		if (|| (> $princess 1) (= $savetheprincess1 2)) [
			guitext "now i must save the princess."
		] [
			guitext "i have obtained all the keys."
		]
		guibar 
		if $pickedkeys1 [
			guitext "she must be somewhere in here."
		] [
			guitext "now i must venture to princess temple."
		]
	] "a lost princess"

	"pickup" = [
	if (= (getalias (format "gotkey%1" $arg1)) 0) [
		(format "gotkey%1" $arg1) = 1
		echo "0You've picked up a key"
		key = (+ $key 1)
		totalkeys = (+ $totalkeys 1)
	] [
	]
]

"gotkey1" = [0]
"gotkey3" = [0]
"gotkey2" = [0]
"gotkey5" = [0]
"gotkey4" = [0]


"level_trigger_11" = [showgui rob-zombi]
newgui rob-zombi [
					guitext "Hello there, can i ask you a favor?" chat
				guibar
				guilist [
				guibutton "yes"
				guibutton "no" "cleargui 1"
	][

					guitext "you must travel all over this vast land to get the keys of the gods." chat
					guitext "it is all in an effort to save the princess." chat
					guitext "please hurry and find the keys brave worrier" chat
					guibutton "i will go as fast as i can." chat
					]
			]



level_trigger_3 = [showgui princess-peach]
newgui princess-peach [
guitext "my hero!" chat
guitext "your not mario!" chat
guitext "wrong princess idiot!" chat
]

level_trigger_4 = [showgui zelda]
newgui zelda [
guitext "my hero!" chat
guitext "you win!" chat
]

"level_trigger_10" = [if (= $totalkeys 5)
"level_trigger_9" = [pickup 9]
"level_trigger_8" = [pickup 8]
"level_trigger_7" = [pickup 7]
"level_trigger_6" = [pickup 6]
"level_trigger_5" = [pickup 5]
now i know that those arent the only problems i have but they are the ones i can think of off hand. i will appreciate any help i can get from anyone. please help me.
Last edited by Obsidian on September 11th, 2009, 7:52 am, edited 1 time in total.
Reason: ...use the code tags.
User avatar
Mike
Administrator
Administrator
Posts: 871
Joined: May 24th, 2009, 12:52 pm

Re: help

Post by Mike »

Have you looked at the FAQ yet? My village modification example even uses keys, and five of them. Take care.
-mike
Sign up for our Newsletter to keep up to date with the Sandbox news!
We also have a facebook page, facebook group, myspace page and a twitter page[/b][/color]!
bryanfblareunion
Member
Member
Posts: 24
Joined: October 21st, 2009, 11:01 am
Name: bryanfbla

Re: help

Post by bryanfblareunion »

if [ ( = $numkeys 5) trigger 10 1 ] (((((if 10 is ur door)))))

hope this helps :geek:
Locked