By: The Yellow Mole
Sub Wall (index, dir)
Select Case dir
Case 0
If
GetPlayerDir(index) = 0 Then
Call
PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index),
GetPlayerY(index)+1)
End
If
If GetPlayerDir(index) = 2 Then
Call PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index)+1,
GetPlayerY(index))
End
If
Case 1
If GetPlayerDir(index) = 0
Then
Call PlayerWarp(index, GetPlayerMap(index),
GetPlayerX(index), GetPlayerY(index)+1)
End If
Case 2
If
GetPlayerDir(index) = 0 Then
Call
PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index),
GetPlayerY(index)+1)
End
If
If GetPlayerDir(index) = 3 Then
Call PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index)-1,
GetPlayerY(index))
End
If
Case 3
If GetPlayerDir(index) = 3
Then
Call PlayerWarp(index, GetPlayerMap(index),
GetPlayerX(index)-1, GetPlayerY(index))
End If
Case 4
If
GetPlayerDir(index) = 3 Then
Call
PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index)-1,
GetPlayerY(index))
End
If
If GetPlayerDir(index) = 1 Then
Call PlayerWarp(index,
GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index)-1)
End If
Case 5
If
GetPlayerDir(index) = 1 Then
Call PlayerWarp(index, GetPlayerMap(index),
GetPlayerX(index), GetPlayerY(index)-1)
End
If
Case 6
If GetPlayerDir(index) = 2
Then
Call PlayerWarp(index, GetPlayerMap(index),
GetPlayerX(index)+1, GetPlayerY(index))
End If
If GetPlayerDir(index) = 1 Then
Call
PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index),
GetPlayerY(index)-1)
End If
Case 7
If GetPlayerDir(index) = 2 Then
Call PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index)+1,
GetPlayerY(index))
End
If
Case 8
If GetPlayerDir(index) = 0
Then
Call PlayerWarp(index, GetPlayerMap(index),
GetPlayerX(index), GetPlayerY(index)+1)
End If
If GetPlayerDir(index) = 2
Then
Call PlayerWarp(index, GetPlayerMap(index),
GetPlayerX(index)+1, GetPlayerY(index))
End If
If GetPlayerDir(index) = 3
Then
Call PlayerWarp(index, GetPlayerMap(index),
GetPlayerX(index)-1, GetPlayerY(index))
End If
Case 9
If
GetPlayerDir(index) = 0 Then
Call
PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index),
GetPlayerY(index)+1)
End
If
If GetPlayerDir(index) = 1 Then
Call PlayerWarp(index,
GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index)-1)
End If
If GetPlayerDir(index) = 3
Then
Call PlayerWarp(index, GetPlayerMap(index),
GetPlayerX(index)-1, GetPlayerY(index))
End If
Case 10
If
GetPlayerDir(index) = 1 Then
Call PlayerWarp(index, GetPlayerMap(index),
GetPlayerX(index), GetPlayerY(index)-1)
End
If
If GetPlayerDir(index) = 2 Then
Call PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index)+1,
GetPlayerY(index))
End
If
If GetPlayerDir(index) = 3 Then
Call PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index)-1,
GetPlayerY(index))
End
If
Case 11
If GetPlayerDir(index) = 1
Then
Call PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index),
GetPlayerY(index)-1)
End If
If
GetPlayerDir(index) = 2 Then
Call
PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index)+1,
GetPlayerY(index))
End
If
If GetPlayerDir(index) = 0 Then
Call PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index),
GetPlayerY(index)+1)
End
If
End Select
End Sub
Use this code to make a system of walls. Walls work in pairs. If
you have a verticle wall, you must place a left-block to the right of it and a
right-block to the left of it. Here are each of the sides the dirs
bloc:
Dir 0: Up/Left
Dir 1: Up
Dir 2: Up/Right
Dir 3:
Right
Dir 4: Right/Down
Dir 5: Down
Dir 6: Down/Left
Dir 7:
Left
Dir 8: Up/Right/Left
Dir 9: Up/Right/Down
Dir 10:
Right/Down/Left
Dir 11: Up/Down/Left
Props to Unknown Raven for helping me work out a
bug