|
-
Jan 5th, 2002, 01:40 PM
#1
i just saw if tileInfo(mapArray(player.x,player.y)).blocked=true . i did this inside the GetAsyncKeyState tests.
ex:
if player presses left key then
if tileInfo(mapArray(player.x,player.y)).blocked=true
player.x=player.x 'prevents the player from moving
elseif tileInfo(mapArray(player.x,player.y)).blocked=false
player.x=player.x-1 ' moves the player
end if
end if
then you also need something to check if your player moves off the edge of the map. i just made a bunch of 'invisible' tiles (just grey coloured tiles) on the edges of the map that were set to blocked=true so that the player couln't walk there....if you have any other questions, just post
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|