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
7
Posts: 1,101
Reputation: 6,146

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
269
S
52
G
16
Posts: 2,045
Reputation: 44,140

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
269
S
52
G
16
Posts: 2,045
Reputation: 44,140

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
269
S
52
G
16
Posts: 2,045
Reputation: 44,140


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 2 guests