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

Player Can go Through Each Other


ihelios
 Share

Recommended Posts

Hey everyone,

Would it be possible for me, to edit the source code, so players can go through each other? I don't want people blocking the entrance to some bridge. Or people blocking the door way to a room or something.. But I don't want people going through NPCs, can any tell me how to source code edit this?

Thanks

;-d
Link to comment
Share on other sites

Just have a walkthrough attribute where you don't want people to block each other. Or, you could go into the source and find (client-side):

```
Function CanMove() As Boolean

```
And remove

```
    If Map(GetPlayerMap(MyIndex)).Tile(X, y).Type = TILE_TYPE_WALKTHRU Then
        Exit Function
    Else
        For I = 1 To MAX_PLAYERS
            If IsPlaying(I) Then
                If GetPlayerMap(I) = GetPlayerMap(MyIndex) Then
                    If GetPlayerX(I) = X Then
                        If GetPlayerY(I) = y Then
                            CanMove = False
                            Exit Function
                        End If
                    End If
                End If
            End If
        Next I
    End If

```
NOT TESTED, MAKE A BACKUP.

Warning - while you were typing a new reply has been posted. You may wish to review your post.

This is more win though.
Link to comment
Share on other sites

  • 2 weeks later...
@Soul:

> Just have a walkthrough attribute where you don't want people to block each other. Or, you could go into the source and find (client-side):
>
> ```
> Function CanMove() As Boolean
>
> ```
> And remove
>
> ```
>     If Map(GetPlayerMap(MyIndex)).Tile(X, y).Type = TILE_TYPE_WALKTHRU Then
>         Exit Function
>     Else
>         For I = 1 To MAX_PLAYERS
>             If IsPlaying(I) Then
>                 If GetPlayerMap(I) = GetPlayerMap(MyIndex) Then
>                     If GetPlayerX(I) = X Then
>                         If GetPlayerY(I) = y Then
>                             CanMove = False
>                             Exit Function
>                         End If
>                     End If
>                 End If
>             End If
>         Next I
>     End If
>
> ```
> NOT TESTED, MAKE A BACKUP.
>
> Warning - while you were typing a new reply has been posted. You may wish to review your post.
>
> This is more win though.

There's a WalkThrough? Wow I feel like a noob!  XD
Link to comment
Share on other sites

  • 3 weeks later...
Soul, not remove but, why not just change the false to true?

```
  If Map(GetPlayerMap(MyIndex)).Tile(X, y).Type = TILE_TYPE_WALKTHRU Then        Exit Function    Else        For I = 1 To MAX_PLAYERS            If IsPlaying(I) Then                If GetPlayerMap(I) = GetPlayerMap(MyIndex) Then                    If GetPlayerX(I) = X Then                        If GetPlayerY(I) = y Then                            CanMove = True                            Exit Function                        End If                    End If                End If            End If        Next I    End If

```
Link to comment
Share on other sites

@Huntsman:

> link=topic=55999.msg603926#msg603926 date=1264803106]
> Soul, not remove but, why not just change the false to true?
>
> ```
>   If Map(GetPlayerMap(MyIndex)).Tile(X, y).Type = TILE_TYPE_WALKTHRU Then        Exit Function    Else        For I = 1 To MAX_PLAYERS            If IsPlaying(I) Then                If GetPlayerMap(I) = GetPlayerMap(MyIndex) Then                    If GetPlayerX(I) = X Then                        If GetPlayerY(I) = y Then                            CanMove = True                            Exit Function                        End If                    End If                End If            End If        Next I    End If
>
> ```

Because then you would waste unnecessary space and lose speed.
Link to comment
Share on other sites

  • 3 weeks later...
@Soul:

> @Huntsman:
>
> > link=topic=55999.msg603926#msg603926 date=1264803106]
> > Soul, not remove but, why not just change the false to true?
> >
> > ```
> >   If Map(GetPlayerMap(MyIndex)).Tile(X, y).Type = TILE_TYPE_WALKTHRU Then        Exit Function    Else        For I = 1 To MAX_PLAYERS            If IsPlaying(I) Then                If GetPlayerMap(I) = GetPlayerMap(MyIndex) Then                    If GetPlayerX(I) = X Then                        If GetPlayerY(I) = y Then                            CanMove = True                            Exit Function                        End If                    End If                End If            End If        Next I    End If
> >
> > ```
>
> i could use this actualy so we don't have to keep setting down atributes  where is this in that you guys are editing is it in modgamelogic?
> Because then you would waste unnecessary space and lose speed.
Link to comment
Share on other sites

  • 1 month later...

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...