Help with Touch, Dragging and Boundaries

Get help using Construct 2

Post » Wed May 30, 2012 3:12 pm

I am making a Disc Battle/Air Hockey game, using Touch to drag the the Bat and hit the Puk.

Touch has been set to use Mouse Input.

But I am having trouble setting a Boundary as the Bat may not move over to the opponent side.

The opponent Bat/CPU works with Lerp and a Hotspot over the CPU half and set to:

Puck | Is overlapping AI_Movement | Bat_AI | Set Y to lerp(Bat_AI.Y,Puk.Y,0.10

AI_Movement being the hotspot covering the CPU side of the game.

but I can't figure out for the player.

Any advice?Pixiefingers2012-05-30 15:14:29
B
11
S
2
Posts: 127
Reputation: 1,532

Post » Wed May 30, 2012 3:16 pm

Could you just set X and Y limits?
E.g. if object.X > amount, object.X = amount.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Wed May 30, 2012 3:22 pm

Could you perhaps give me a little more to go on?

I am still new at C2 and haven't had to work with limits yet.
B
11
S
2
Posts: 127
Reputation: 1,532

Post » Wed May 30, 2012 3:26 pm

Oh wait, duh! got it, thanks!
B
11
S
2
Posts: 127
Reputation: 1,532


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests