Guest Posted August 14, 2012 Share Posted August 14, 2012 so i have some code herebasically its supposed to change the sprite and warp you to said map. it does all this but if i dont move my character after the code runs it just sits their on the old map, after i move a few tiles i am on the correct map.(it does move your loc, it just doesnt change the map instantly)how can i make it switch to the correct map instantly instead of waiting for me to move? ```Dim mapnum As Long, npcNum As LongIf mapnum > 0 And npcNum > 0 Then SetPlayerMap index, mapnum SetPlayerX index, MapNpc(mapnum).NPC(npcNum).x SetPlayerY index, MapNpc(mapnum).NPC(npcNum).y SetPlayerSprite index, 2 TempPlayer(index).InShop = 0 TempPlayer(index).Dead = False SetPlayerVital index, MP, 0 SendPlayerData (index) Else``` Link to comment Share on other sites More sharing options...
Ruins of Hell Posted August 14, 2012 Share Posted August 14, 2012 Use PlayerWarp instead of setting each coordinate manually and check if that fixes it. Link to comment Share on other sites More sharing options...
crzyone9584 Posted August 14, 2012 Share Posted August 14, 2012 > Dim mapnum As Long, npcNum As Long> > If mapnum > 0 And npcNum > 0 Then> > Call PlayerWarp(index, mapnum, GetPlayerX(index), GetPlayerY(index))> SetPlayerSprite index, 2> TempPlayer(index).InShop = 0> TempPlayer(index).Dead = False> SetPlayerVital index, MP, 0> SendPlayerData (index)> ElseThat should work just fine. As Soul said use Playerwarp when ever you want to change the players map.I have no clue why your using npcs location for the new x,y for the map transfer so i jsut did a basic getplayerx and getplayery Link to comment Share on other sites More sharing options...
Guest Posted August 14, 2012 Share Posted August 14, 2012 that fixed it thanks guys! +2 for your both fast response. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now