Push/Pull objects

For questions about using Classic.

Post » Sun Mar 14, 2010 8:14 pm

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:
[code:2vtl5ewi]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!
B
2
G
2
Posts: 19
Reputation: 688

Post » Sun Mar 14, 2010 9:03 pm

>Mouse button is down
->sprite(custom movement) restrain distance from object when always.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sun Mar 14, 2010 9:28 pm

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!
B
2
G
2
Posts: 19
Reputation: 688


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests