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.

Trial Runs

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.
UCLA.RES.
Member
Member
Posts: 18
Joined: August 23rd, 2011, 1:11 pm
Name: Daniel

Trial Runs

Post by UCLA.RES. »

Hello,

Can anyone tell me how to make trail runs as part of the PAS experience? I basically want to make it so that once the player reaches the end of my maze, they re-spawn to another random maze map that I have saved. So that it's just constantly changing randomly from map to map (all maps I make are mazes) and the player doesn't stop playing. Would this be with the use of the portal entity? Would I have to mod. it out?
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: Trial Runs

Post by arcones »

It's a simple map change code. There's several around the forum that are easily found, but here's the one I'd use.

Teleport Code
Image
Want a user bar like this one? PM Leo!
UCLA.RES.
Member
Member
Posts: 18
Joined: August 23rd, 2011, 1:11 pm
Name: Daniel

Re: Trial Runs

Post by UCLA.RES. »

Thank You Arcones, this is tremendously helpfull , but I was wondering if there was a code I can put that respawns it into another randomized map. Is there a code for that? or is there another way to make it randomized? After much though, I can't seem to make it random. The reason I need to do this is ecause i am usign the program on experimentation on mice, and there can't be a repeating pattern that the mouse can memorize. IS there anything you could do to help me in this regard?

Best,
Daniel
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: Trial Runs

Post by arcones »

A randomized map change would be impossible due to the fact in the code you must specify the map you are teleporting to. Otherwise, it would simply load a newmap, or not work at all.

In order to have a randomized map change, you'll need to edit the source code. I'm afraid that's the only solution at this point.
Image
Want a user bar like this one? PM Leo!
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: Trial Runs

Post by chocolatepie33 »

Your best bet is to make either a really long maze map (or something similar), or make many maps which are each quite different. This way, you can specifically choose which map loads, and the more maps you have, the longer it'll take before they start to repeat.
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
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: Trial Runs

Post by Leo_V117 »

Oh, actually... I beleive there is a way to make a random number generator. So if the number equals a specific one, level_trigger_x will load a random map that equals that number. I'll ask Hirato when I can, then trial a code. There shouldnt be any need to create long mazes. I'll let you know when I can.

- Leo
UCLA.RES.
Member
Member
Posts: 18
Joined: August 23rd, 2011, 1:11 pm
Name: Daniel

Re: Trial Runs

Post by UCLA.RES. »

Leo_v117, THAT WOULD BE AMAZING! Please let me know if you find the coding!
User avatar
Mike
Administrator
Administrator
Posts: 871
Joined: May 24th, 2009, 12:52 pm

Re: Trial Runs

Post by Mike »

Leo hopefully this helps, need any more?
http://sauerbraten.org/docs/config.html#rnd

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]!
User avatar
Mike
Administrator
Administrator
Posts: 871
Joined: May 24th, 2009, 12:52 pm

Re: Trial Runs

Post by Mike »

hirato wrote the code in like five seconds, haha. So you'd have:

level_trigger_1 = [
listofmaps = [map1 map2]; map (at $listofmaps (rnd (listlen $listofmaps)))
]

map1, and map2 would represent whatever two maps you wanted in there, you'd need to write all the map names in those brackets that you'd want to randomize it for. Here is more info on the actual map change stuff, you can even make it say a message before the map changes:
http://www.sandboxgamemaker.com/wiki/in ... nother_map

Take care and thanks Hirato for you help!
-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]!
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: Trial Runs

Post by Leo_V117 »

Mike wrote:hirato wrote the code in like five seconds, haha. So you'd have:

level_trigger_1 = [
listofmaps = [map1 map2]; map (at $listofmaps (rnd (listlen $listofmaps)))
]

map1, and map2 would represent whatever two maps you wanted in there, you'd need to write all the map names in those brackets that you'd want to randomize it for. Here is more info on the actual map change stuff, you can even make it say a message before the map changes:
http://www.sandboxgamemaker.com/wiki/in ... nother_map

Take care and thanks Hirato for you help!
-mike
I wrote one too, mine seems a little more simple, but it might not work. I was ill when I wrote it, so... Trust Hirato's if you wish. However:

Code: Select all

mapnum = [rnd 20] // Basically, your total maps.

echo (format "Teleporting to maze %1" $mapnum) // Remove this if you want.

level_trigger_1 = [
    sp (format "map_%1" $mapnum)
]
// Ensure maps are named "map_1", "map_2"... "map_19", "map_20".
Locked