Justin Knight Posted April 4, 2016 Author Share Posted April 4, 2016 Players are able to walk through events (even if they don't have walkthough checked) because it only checks for events on the client side of the game. I found the code that I need to have check for events on the server side but I'm not sure what If statement I need to make/ how to word it. Here's one of the 4 cases I'd need to change.```Case DIR_LEFT ' Check to make sure not outside of boundries If GetPlayerX(index) > 0 Then ' Check to make sure that the tile is walkable If Not isDirBlocked(Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index)).DirBlock, DIR_LEFT + 1) Then If Map(GetPlayerMap(index)).Tile(GetPlayerX(index) - 1, GetPlayerY(index)).Type <> TILE_TYPE_BLOCKED Then If Map(GetPlayerMap(index)).Tile(GetPlayerX(index) - 1, GetPlayerY(index)).Type <> TILE_TYPE_RESOURCE Then ' Check to see if the tile is a key and if it is check if its opened If Map(GetPlayerMap(index)).Tile(GetPlayerX(index) - 1, GetPlayerY(index)).Type <> TILE_TYPE_KEY Or (Map(GetPlayerMap(index)).Tile(GetPlayerX(index) - 1, GetPlayerY(index)).Type = TILE_TYPE_KEY And temptile(GetPlayerMap(index)).DoorOpen(GetPlayerX(index) - 1, GetPlayerY(index)) = YES) Then 'move player Call SetPlayerX(index, GetPlayerX(index) - 1) SendPlayerMove index, movement, sendToSelf Moved = YES 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)).Left > 0 Then NewMapX = Map(Map(GetPlayerMap(index)).Left).MaxX Call PlayerWarp(index, Map(GetPlayerMap(index)).Left, NewMapX, GetPlayerY(index)) Moved = YES ' clear their target TempPlayer(index).target = 0 TempPlayer(index).targetType = TARGET_TYPE_NONE SendTarget index End If End If```In case you want to know how players can clip through events, They just have to walk in to the event while holding ctrl. Keep holding the arrow key and ctrl, and close the game. Still holding arrowkey+ctrl log back in and the player should be inside of the event or past it. Link to comment Share on other sites More sharing options...
xelander Posted April 5, 2016 Share Posted April 5, 2016 Well, is this fixed in newer versions of the engine? Would be interesting to know, nice find though. Link to comment Share on other sites More sharing options...
Growlith1223 Posted April 5, 2016 Share Posted April 5, 2016 No one ever took the time to really look into the event system's code since it was barbarically made, so i wouldn't be surprised if it wasn't fixed.Regardless, all you need to do is check to see if there is an event in the direction you're facing, if so, check to see if it is solid, if so, then exit sub. simple as that. yall can figure out the rest Link to comment Share on other sites More sharing options...
Justin Knight Posted April 7, 2016 Author Share Posted April 7, 2016 I figured it out. I'll post the bug fix soon 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