Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
gallefray
gallefray's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
need help with a sokoban clone
[2 Replies]
14-Aug-2012 05:52 AM
Forum:
Programming Questions
I need a bit of help, I have most of the code, It's just this one bit that's puzzling me.
void objcollenemy1() {
if (dotX+25 >= enemyX-25 && (dotY == enemyY)) {
enemyX++;
enemyX++;
enemyX++;
}
else if (dotX-25 <= enemyX+25 && (dotY == enemyY)) {
enemyX--;
enemyX--;
enemyX--;
enemyX--;
}
}
the problem I'm having, is that when the moveable dot goes to the right side of the box (enemy)
the box moves to the right side of the dot, Instead of being pushed by the dot. It works when you go to the left of the box.
I know it's something to do with the Y co-ordinates, but it's baffling me.
here's a link to the source and executable:
link
thanks in advance.
«Prev
Next »
Moderate user : gallefray
Forum