How do I make ARENA

Get help using Construct 2

Post » Thu May 15, 2014 3:42 pm

Hello,
There is arena. Player has 8 Direction Movement. How I can restrict him to leave sand area? (I know, when Player leaves sund make speed =0, acceleration = 0, but how make him return his speed stats when he want go out from this "wall". Image
B
4
Posts: 4
Reputation: 210

Post » Fri May 16, 2014 12:35 pm

You could do something like this:
Create 2 variables:
PlayerLastX
PlayerLastY

Every Tick:
If PlayerSprite touches SandSprite Set PlayerLastX to Player.X and PlayerLastY to Player.Y
Every Tick:
If PlayerSprite is not touching Sand Sprite:
Set Player position to PlayerLastX & PlayerLastY so that it remains on the SandSprite and can still move where it came from.
B
17
S
3
G
3
Posts: 89
Reputation: 2,825


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests