iraasta Posted December 10, 2012 Author Share Posted December 10, 2012 Hi there i wrote some code for ignoring collsion if boolean **vehicle** is true. It works perfectly fine, however when i move with disabled collision few steps character jumps to the very end of the screen. I was looking for that error for long but didnt find anything. Help pls.Here is example of UP dir:```Select Case Dir Case DIR_UP ' Check to make sure not outside of boundries If GetPlayerY(index) > 0 Then ' Check if we are in vehicle - ROLLING BIATCH If Vehicle Then Call SetPlayerY(index, GetPlayerY(index) - 1) SendPlayerMove index, movement, sendToSelf Moved = YES ' Check to make sure that the tile is walkable ElseIf Not isDirBlocked(Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index)).DirBlock, DIR_UP + 1) Then If Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index) - 1).Type <> TILE_TYPE_BLOCKED Then If Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index) - 1).Type <> TILE_TYPE_RESOURCE Then ' Check to see if the tile is a event and if it is check if its opened If Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index) - 1).Type <> TILE_TYPE_EVENT Then Call SetPlayerY(index, GetPlayerY(index) - 1) SendPlayerMove index, movement, sendToSelf Moved = YES Else If Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index) - 1).Data1 > 0 Then If Events(Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index) - 1).Data1).WalkThrought = YES Or (Player(index).EventOpen(Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index) - 1).Data1) = YES) Then Call SetPlayerY(index, GetPlayerY(index) - 1) SendPlayerMove index, movement, sendToSelf Moved = YES End If End If End If End If End If End If Else ' Check to see if we can move them to the another map If Map(GetPlayerMap(index)).Up > 0 Then NewMapY = Map(Map(GetPlayerMap(index)).Up).MaxY Call PlayerWarp(index, Map(GetPlayerMap(index)).Up, GetPlayerX(index), NewMapY) Moved = YES ' clear their target TempPlayer(index).target = 0 TempPlayer(index).targetType = TARGET_TYPE_NONE SendTarget index End If End If``` Link to comment Share on other sites More sharing options...
iraasta Posted December 10, 2012 Author Share Posted December 10, 2012 I fixed it.In Dir Left and Right i made:```SetPlayerY(index,GetPlayerX - 1)```Instead of```SetPlayerX(index,GetPlayerX - 1)```EOT.Thanks for trying to help if so ;] 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