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.

Map loading trigger replaces original map?

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.
Rueppells-Fox
Member
Member
Posts: 13
Joined: March 31st, 2011, 9:12 pm
Name: Emily

Map loading trigger replaces original map?

Post by Rueppells-Fox »

I thought I had it figured out, based on viewtopic.php?f=15&t=2730. I upgraded to sandbox 2.6.1, and I was working with two maps (Game1map1 and Game1map2).

Using the in game config editor, I typed this code:

Code: Select all

level_trigger_2=[
 echo "Teleporting..."
 echo "Location found."
 echo "Welcome home!"
 sleep 5000
 map Game1map2
I don't know what I'm supposed to do after I typed it, but I started playing around with the buttons and clicked 'exec'. Game1map1 promptly disappeared and was replaced with Game1map2. The problem is that no matter what I do, I can't make the first map reappear - Game1map2 loads when I open map1 from the starting screen.
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: Map loading trigger replaces original map?

Post by arcones »

Are you saving the code and the map?

If you execute BEFORE saving the map, then it'll remove any work you did. You must save the map before executing.
Image
Want a user bar like this one? PM Leo!
Rueppells-Fox
Member
Member
Posts: 13
Joined: March 31st, 2011, 9:12 pm
Name: Emily

Re: Map loading trigger replaces original map?

Post by Rueppells-Fox »

I reviewed this: viewtopic.php?f=15&t=2690&hilit=coding and used the exact same coding used in the example, but none of it worked (I did remove the <---- Bracket thing). Just to be sure, I made a new map (and saved it) and used ConTEXT to write the codes.
I saved the cfg file to have the exact same name as the map and saved it in the area with the other test files. The code currently looks like this:

Code: Select all

"on_start" = [
   coin = 0
   horse = 0
   sword = 0
   food = 0
   ]

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

"level_trigger_2" = "showgui Shopkeeper"

newgui Shopkeeper [
   guitext "What will it be today?" chat
   guibar
   guilist [
      guibutton "Food: 10 coins" [
         if ( > $coin 9 ) [
            coin = ( - $coin 10 )
            food = ( + $food 1 )
         ]
      ]
      guibar
      guibutton "Sword: 150 coins" [
         if ( > $coin 149 ) [
            coin = ( - $coin 150 )
            sword = ( + $sword 1 )
            ]
         ]
      guibar
      guibutton "Horse: 7050 coins" [
         if ( > $money 7049 ) [
            money = ( - $money 7050 )
            horse = ( + $horse 1 )
            ]
         ]
   ]
]

newgui Inventory
guibutton "Back" "cleargui 1"
guibar
guitext ( format "You have %1 coins in your wallet." $coin )
guitext ( format "You have %1 Food." $food )
guitext ( format "You have %1 swords." $sword )
guitext ( format "You have %1 horse." $horse )
]

newgui main [
   guilist [
      guilist [
         guibutton "Inventory" "showgui Inventory"
      ]
   ]
   guibar
   @main
]
And I used the proper trigger levels to match with the code. I have no idea what's going on anymore. Is there something I'm doing horribly wrong in this process?
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: Map loading trigger replaces original map?

Post by arcones »

I have two questions then:

What mode are you using: RPG, FPS, etc.
What gamemode are you using: Run-around, coopedit, single player, banana relay, etc.
Image
Want a user bar like this one? PM Leo!
Rueppells-Fox
Member
Member
Posts: 13
Joined: March 31st, 2011, 9:12 pm
Name: Emily

Re: Map loading trigger replaces original map?

Post by Rueppells-Fox »

I'm using FPS in coopedit
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: Map loading trigger replaces original map?

Post by arcones »

Alrighty, that's your problem. You need to be in Single Player gamemode.
Image
Want a user bar like this one? PM Leo!
Rueppells-Fox
Member
Member
Posts: 13
Joined: March 31st, 2011, 9:12 pm
Name: Emily

Re: Map loading trigger replaces original map?

Post by Rueppells-Fox »

With the coding test map, the inventory shows up in the main menu, but nothing else works (Sorry, I must be becoming a bit of a pain by now - I can only imagine how many millions of questions the support team receives daily).
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: Map loading trigger replaces original map?

Post by arcones »

Haha, that's fine ;)

So you've got a mmodel in the game? An ogre or perhaps an RC as the shopkeeper? If so, his level trigger must be 2. Make sure you've got some sort of coin that is level trigger 1.

If you have the mmodel's in-game then you should be fine.
Image
Want a user bar like this one? PM Leo!
User avatar
kid matthew
Developer
Developer
Posts: 468
Joined: August 11th, 2009, 5:28 pm
Name: Matthew
IRC Username: Kid_matthew
Location: Land of Sandbox.

Re: Map loading trigger replaces original map?

Post by kid matthew »

Rueppells-Fox
There realy isnt alot of questions asked, We all learn from every post we make. =]
Cheers
Matthew
Lost Lands Work In Progress <3 viewtopic.php?f=10&t=2522 <3
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: Map loading trigger replaces original map?

Post by arcones »

True true. Although I get more PM's then one might think about Support :P
Image
Want a user bar like this one? PM Leo!
Locked