Mirage Source http://web.miragesource.net/forums/ |
|
Map Directional Warp Block Fix http://web.miragesource.net/forums/viewtopic.php?f=210&t=3776 |
Page 1 of 1 |
Author: | James [ Wed May 28, 2008 3:39 am ] |
Post subject: | Map Directional Warp Block Fix |
The title is long, but the tutorial is simple. Ever have those annoying mapping things you don't think about? You place a rock at the edge, block the tile. It can be access from a map below it, then some player ends up on a large blocked path? Sometimes maps just need to end at the edges and not have people warp on them.Here is the simple fix. All Server Side! Open: ModGameLogic In: Sub PlayerMove Find: Code: Dim MapNum As Long Add Under: Code: Dim NewMap As Long Find: Code: ' Check to see if we can move them to the another map If Map(GetPlayerMap(Index)).Up > 0 Then Call PlayerWarp(Index, Map(GetPlayerMap(Index)).Up, GetPlayerX(Index), MAX_MAPY) Moved = YES End If Replace with: Code: ' Check to see if we can move them to the another map If Map(GetPlayerMap(Index)).Up > 0 Then NewMap = Map(GetPlayerMap(Index)).Up If Map(NewMap).Tile(GetPlayerX(Index), MAX_MAPY).Type <> TILE_TYPE_BLOCKED Then Call PlayerWarp(Index, Map(GetPlayerMap(Index)).Up, GetPlayerX(Index), MAX_MAPY) Moved = YES End If End If Do the same for the other directions. Problems or fixes or whatnot, post here. ![]() |
Author: | Rezeyu [ Wed May 28, 2008 5:49 am ] |
Post subject: | Re: Map Directional Warp Block Fix |
Simpler fix: Don't map random blocks for no reason on the edges of maps where players will walk onto. I'd personally find it more annoying to be running against the edge of a map and not know why I can't cross over. ![]() |
Author: | James [ Wed May 28, 2008 6:49 am ] |
Post subject: | Re: Map Directional Warp Block Fix |
Sometimes a block at the edge just fits. Edit: Idea could also be used to check for an NPC or a Player so you don't have 2 players on top of one another or warp over an NPC or whatnot. |
Author: | shaded [ Wed May 28, 2008 11:01 pm ] |
Post subject: | Re: Map Directional Warp Block Fix |
Actually with my game I do need to add something like this in. Players can create walls and cities on the edge of the maps. If they close the gates of the city, they will be blocking other players. But what I'll do is if there is a blocking square on the adjacent map, then on the current map I'll blit some thin border or something to let the players know they cannot go there. |
Author: | Labmonkey [ Wed May 28, 2008 11:50 pm ] |
Post subject: | Re: Map Directional Warp Block Fix |
Yea. That is one of the rules of mapping. Never put blocks on the edges of maps if they don't continue on the adjacent maps. Come to think of it, I should write down the 5 rules of mapping ![]() |
Author: | Rian [ Thu May 29, 2008 6:39 am ] |
Post subject: | Re: Map Directional Warp Block Fix |
And who made the 5 rules for mapping? We all have different layers and attributes, and I'm sure your 5 rules for mapping would prove quite obsolete to anyone who's added anything to the maprec that can't be found on these forums in tutorial form. It all comes down to preference really. Personally, I think this is a must have tutorial unless you have scrolling maps. In my opinion, unless you add this tutorial, or scrolling maps, you're either limited as to where you can place block tiles, or have to add extra block tiles to the next map that you might not want to add. I find it annoying when I switch maps and I have to redirect my route due to a block tile that's 1 tile from the edge. I also find it annoying when I switch maps and land right on a block tile and essentially am able to pass right through it. Brilliant tutorial James. Though, I wouldn't call it a bug fix, like I said, I think it's a preference. |
Author: | James [ Thu May 29, 2008 8:12 pm ] |
Post subject: | Re: Map Directional Warp Block Fix |
You can move it if you wish. I wasn't sure where to place it. Also, to let people know you could add a player message that says "Something blocks your path..." or something...just a thought. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |