Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / TileMap Portal Help

Author
Message
Derekioh
17
Years of Service
User Offline
Joined: 1st Feb 2009
Location:
Posted: 11th Aug 2012 18:56
So I am wondering how i would go about going from one tile map to another. Like you are in a room and there is stairs going down and when you hi the stairs and loads a new tile map with the room below. I believe it is called \"portal\" but not sure. I can load the tile maps fine, just need help with the event to transition it. Any ideas?

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 11th Aug 2012 19:09
You'll have to link the portals together in order for them to work, and that's best done by assigning a unique ID to every portal and then having connected portals store the ID of the portal it connects to:

Portal(0).connectID = 3
Portal(1).connectID = 0
Portal(2).connectID = 0
Portal(3).connectID = 1


Above you can see that portal 0 goes to 3, portal 1 goes to 0, portal 2 goes to 0, and portal 3 goes to 1. That's how I'd connect them together.

Then what you could do is something like this:

-check if player collides with a portal
-check if the portal has a connectID in another map
-dump the coordinates of the player into a file
-make some cool transition effect into a black screen
-load new map into memory
-set player coordinates to that of the "end portal"
-make another coll transition effect from black into the map

TheComet

Your mod has been erased by a signature, please reduce him [overall] to no larger than 120 kg please.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 13th Aug 2012 10:24
Quote: "-set player coordinates to that of the "end portal""


using this data

Quote: "-dump the coordinates of the player into a file"


Just thought I would point that one out TheComet you missed it out

[added for completeness] {if I was wrong, hit me as hard as you can }

That was an awesome method TheComet I enjoyed reading it, got me thinking a lot!!!

Thanks for sharing that.

Derekioh
17
Years of Service
User Offline
Joined: 1st Feb 2009
Location:
Posted: 14th Aug 2012 18:29
sorry ive been busy, but this should help greatly! Thanks!

Login to post a reply

Server time is: 2026-07-21 20:36:19
Your offset time is: 2026-07-21 20:36:19