Posted By
|
Message
|
Vaynes
Registered 27/01/2005
Points 15
|
25th February, 2005 at 06:30:13 -
I'm trying to make an isometric turn based combat rpg stlye games, but i'm having trouble getting the walls to stop the player from walking throught them.
The player will stop when he colides with them but if you click to make him move again he walks straight through them.
Any one got any ideas on how to stop this?
Ever bitten off more than you can chew?
|
The Chris Street Administrator
Unspeakably Lazy Admin
Registered 14/05/2002
Points 48488
|
25th February, 2005 at 07:11:40 -
Instead of "collides" with wall, try "overlaps"
n/a
|
Vaynes
Registered 27/01/2005
Points 15
|
25th February, 2005 at 11:25:24 -
tried that, the sprite just sticks to the wall when i use that, i'm using an active object as the collision detection btw.
Ever bitten off more than you can chew?
|
Kirby Smith Resident Slacker
Registered 18/05/2003
Points 479
|
25th February, 2005 at 12:13:14 -
Use a detector object.
User presses direction button
Move detector object to intended destination
If detector overlaps wall, set flag to 0
If detector does not overlap wall, set flag to 1
If flag = 0, do not move character
If flag = 1, move character
I'm sure there are better ways to do it, but that's probably the easiest to implement.
XBL Gamertag: Rampant Mjolnir
|
Vaynes
Registered 27/01/2005
Points 15
|
25th February, 2005 at 12:49:21 -
i'm already doing something like that for the point and click movement, i'll try and refine the code a bit and see what happens.
Ever bitten off more than you can chew?
|
Vaynes
Registered 27/01/2005
Points 15
|
1st March, 2005 at 04:00:08 -
got it sorted, using the active to mark the position i want the sprite to move to. If the active is overlapping a bacdrop object then it snaps back to the position of the sprite and he won't move anywhere.
thx
Ever bitten off more than you can chew?
|
|
|