Do you mean this?
For Wall.Wall1 = Each Wall1
Collisions Type_Player,Type_Wall1,2,2
If EntityCollided(Player,Type_Wall1)
If EntityX(Player) > Wall\x#
Wall\x# = Wall\x# - 0.01
ElseIf EntityX(Player) < Wall\x#
Wall\x# = Wall\x# + 0.01
End If
PositionEntity Wall\en,Wall\x#,Wall\y#,Wall\z#
End If
Next
This is the code for when the player collides with a wall.
He will then push it, but the problem is that all of the walls move, not just the one that he is touching.
I want to know how to fix that, so that only the wall
that he touches will move.
If you have any questions for me, or any more code that
you want me to post. I would be happy to do so.
And Thanks again everyone for your help.
For Wall.Wall1 = Each Wall1
Collisions Type_Player,Type_Wall1,2,2
If EntityCollided(Player,Type_Wall1)
If EntityX(Player) > Wall\x#
Wall\x# = Wall\x# - 0.01
ElseIf EntityX(Player) < Wall\x#
Wall\x# = Wall\x# + 0.01
End If
PositionEntity Wall\en,Wall\x#,Wall\y#,Wall\z#
End If
Next
This is the code for when the player collides with a wall.
He will then push it, but the problem is that all of the walls move, not just the one that he is touching.
I want to know how to fix that, so that only the wall
that he touches will move.
If you have any questions for me, or any more code that
you want me to post. I would be happy to do so.
And Thanks again everyone for your help.