Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
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!
Mouse button is down
->sprite(custom movement) restrain distance from object when always.
Develop games in your browser. Powerful, performant & highly capable.
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!