How do I make a thing "return"?

Get help using Construct 2

Post » Sat Jan 17, 2015 2:25 pm

I want to make a Tron game where you throw a disc. After a few "bounces" off the walls of the arena, it should return to you. However, I don't know how. Please keep iun mind that I am fairly new to Construct.
B
3
Posts: 2
Reputation: 179

Post » Sat Jan 17, 2015 2:42 pm

I would give the disc a bullet behaviour and a instance variable for bounces - for every bounce you add to it, and then add something like Bounces > 3 (<== Your limit) lerp(Disc.X,Player.X,dt) erp(Disc.Y,Player.Y,dt) - thiss will make it move back towards the player - you an change the dt*2 or dt*4 or something else to change the speed. This should give a general idea of how to do this, give it a try.
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Mon Jan 19, 2015 10:54 am

you could doit like this
You do not have the required permissions to view the files attached to this post.
B
251
S
39
G
15
Posts: 1,964
Reputation: 40,723

Post » Mon Jan 19, 2015 11:24 am

I have currently made it return, now I just need to come up with a way to make it delete after second contact with the Player...
B
3
Posts: 2
Reputation: 179

Post » Mon Jan 19, 2015 12:19 pm

Use variables to destroy it
B
251
S
39
G
15
Posts: 1,964
Reputation: 40,723

Post » Mon Jan 19, 2015 1:15 pm

Have you tried it like this:
Condition: When (disk) is overlapping with (player)
Action: Destroy (disk)
B
12
S
2
G
1
Posts: 34
Reputation: 741

Post » Mon Jan 19, 2015 3:50 pm

Mathijs90 which disk you talking about? Could you not use variable?
Notreturn=0
Thrown=0
return=0
B
251
S
39
G
15
Posts: 1,964
Reputation: 40,723


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo and 26 guests