Page 1 of 1

teleporting to specific spot on another map?

Posted: July 29th, 2011, 11:07 pm
by t5yvxc
I already found this tutorial on how to teleport***, and it works perfectly fine, but how do i teleport to a specific point on another map?
for example on legend of zelda ocorina of time, hyrule field is center point for all the cities in the game, if I leave kokirko village i teleport to where kokoriko village is on the hyrule field map, same goes for all the other cities with its corresponding spot on the map. How if possible could i do that?





***http://www.sandboxgamemaker.com/wiki/index.php?title=How_to_make_a_trigger_load_another_map

Re: teleporting to specific spot on another map?

Posted: July 30th, 2011, 12:11 am
by DrChef
So, you mean you want to start a map in a specific spot everytime you load the map?
just place a playerstart entity where you want to start in a map

Re: teleporting to specific spot on another map?

Posted: July 30th, 2011, 11:05 am
by t5yvxc
Something like that. i have 5 entry points in my main field that connect to 5 cities and i would like each time i leave one of the 5 cities i appear on the field in front of that cities entrance. For example if i leave city A to go to the field, ill appear in front of the entrance to city A, but if I go to city B, I would like to appear in front of city B on the field.
thanks for replying.

Re: teleporting to specific spot on another map?

Posted: August 4th, 2011, 8:28 pm
by Kooldoode
lol I love how so many people refer to Ocarina of Time, haha good game though.
hmm I know how to create worlds inside a bigger world...but im not sure this would help in your case.
my only question is how does the world know that if your leaving city a to put your character infront of city a and not city b, and vice versa.


**i have my own ocarina, made it myself and will soon start making them to sell.

Re: teleporting to specific spot on another map?

Posted: August 7th, 2011, 2:46 am
by RonnieNeeley
Basically he is asking how do you make them go from one map to a specific player start in another map.

Sandbox is based on the Cube2 engine, which is essentially an FPS game engine. Due to the mechanics of Sauerbraten (the game made with Cube2), I don't think they implemented this as an option as Sauerbraten didn't have a need for it.

As far as my knowledge goes, you'd have to program that feature in yourself. Please correct me if I'm wrong.

Re: teleporting to specific spot on another map?

Posted: August 7th, 2011, 12:28 pm
by siimvuss
He would certainly have to program it himself, the question here is whether it is possible to do with cubescript (then it would be fairly easy) or would it require modifying the source.

Re: teleporting to specific spot on another map?

Posted: August 7th, 2011, 1:41 pm
by Kooldoode
lol well i have no clue in programming at all......trying to learn it but most of it is still just random letters, numbers and characters

Re: teleporting to specific spot on another map?

Posted: January 11th, 2012, 10:00 am
by spikeymikey0196
have you tried making a trigger that is linked to the teleporters/spawns?
Trigger A to Spawn A, Trigger B to Spawn B etc

Re: teleporting to specific spot on another map?

Posted: January 16th, 2012, 6:15 am
by Tony
In the Game's Trigger folder, e.g. data/rpg/games/GAME-NAME-HERE/triggers
Do something like this:

Code: Select all

r_trigger_name "Give the Trigger a Name Here"
r_trigger_script 19    //Be sure to send to the correct script and remember script naming convention
r_trigger_mdl "ahab/castle_door" //model file path and name used here
r_trigger_flags $TRIG_INVIS //makes the flag invisible even


And then in the appropriate script file,in: data/rpg/games/GAME-NAME-HERE/scripts
Same deal, remember naming convention, and do this:

Code: Select all

r_script_signal collide [
  r_teleport actor 0 MAP-NAME-HERE
]


When your player-character collides with the trigger, it will be sent to the named map, to the teledest entity named 0.
You''ll want to spawn a teledest entity to land on, on the destination map.

Hope this was helpful.