Well... I wanted to make a simple box that the player could push or pull by holding a button and moving....
So what i did was:
On button "Action" is being held and box at (Player.X+4,Player.Y)> Set action to "PushPull" Player at (Box.X-4, Player.Y) and Player.action=PushPull> Set Box position at (Player.X+4,Box.Y)[/code:2vtl5ewi] (Then repeats on the opposite direction) However, whenever i tested it the box would "fly" and push the player, usually causing it to fall on a death pit!
Develop games in your browser. Powerful, performant & highly capable.
Mouse button is down
->sprite(custom movement) restrain distance from object when always.
Your solution didn't help! I found a way out myself, however, by giving the box a plataform movement and making it unable to move (maximum x speed and jump strenght=0) unless the player moves it!