Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[Resolved]update map help what would i call?


Guest
 Share

Recommended Posts

so i have some code here
basically 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 Long

If 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

> 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)
>     Else

That 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...