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

[EO] restrict player movement


Mikekan13
 Share

Recommended Posts

So I am trying to stop a player from moving. Example:
```
Select Case Dir
        Case DIR_UP

            ' Check to make sure not outside of boundries
            If GetPlayerY(Index) > 0 Then

                'check sleeping players
                For i = 1 To SleepingPlayerCache(GetPlayerMap(Index)).SleepingPlayer_Count
                    If (SleepingPlayerCache(GetPlayerMap(Index)).SleepingPlayerData(i).x = GetPlayerX(Index) And SleepingPlayerCache(GetPlayerMap(Index)).SleepingPlayerData(i).y = GetPlayerY(Index) - 1) Then
                        CantMove = True
                    End If
                Next

                If CantMove = False Then
```

this doesnt stop them from moving on to the space but instead lets them move to it then if they move again it warps them to their previous space. What am I doing wrong.
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...