Multiple way points by clicking

Get help using Construct 2

Post » Mon Mar 25, 2013 9:33 am

Hello, I have a big problem with making several way points, just make a way point and get my player to follow and stop when you reach and so on. The problem is in trying to do two or more way points (moving), for example, to click and move my player and, while on the move, make a second click to play after the first is directed towards the second and so on, I need help please!

here are my capx: https://dl.dropbox.com/s/uisak8m9aobbp0j/Waypoints%20Clicks.capx?token_hash=AAEebRYWU9ywm3Uz7xDHlGWMCG7UUJUYFP3zAb_NQTHRnA&dl=1

B
6
Posts: 24
Reputation: 774

Post » Mon Mar 25, 2013 12:40 pm

This is a bit complicated, here is 1 idea that works but Im not sure if it is the best way:

Make an array:

On click on a Point insert 1 object at the last index of the Array with the coordinates or the instance of this point

Every Tick AND if Array Index 0 != null
-> Set position to Array(0)

On collide or overlapping with this Point Array(0)
-> Delete first Array Index and set all Indexes new Example: (Array(0) = Array(1) and so on, make this in a loop)

I think this is the easiest way, if you need a example cause my english is bad I will make one for you ;)

B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Post » Mon Mar 25, 2013 12:51 pm

hi @localboss , thanks for replying, my English is too bad, I speak Spanish. not do what you say, do not understand, if you make an example editing my Capx I'd appreciate it, thank you very much!
B
6
Posts: 24
Reputation: 774

Post » Mon Mar 25, 2013 2:02 pm

https://www.dropbox.com/s/vryjkfqvtiek1my/example.capx ,got not much time so I dont changed yours but I made you a nice Example. The mechanic for multiple points works nice every thing else is your job ;)
B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Post » Mon Mar 25, 2013 2:30 pm

@localboss Thank you very much! I will try my capx suit, although I've never used the arrangements and not how they work, I'm confused, but I think that's what I needed, thank you!
B
6
Posts: 24
Reputation: 774

Post » Mon Mar 25, 2013 2:59 pm

No problem, Im glad that I could help you
B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Post » Mon Mar 25, 2013 3:40 pm

@localboss Hi, just have a problem when the player reaches a point and come back to play the same point by mistake, the player goes crazy! How do you fix it?
B
6
Posts: 24
Reputation: 774

Post » Mon Mar 25, 2013 4:04 pm

Grant me one day have to leave my work, I fixx this tomorrow
B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Post » Mon Mar 25, 2013 4:20 pm

ok, thanks!
B
6
Posts: 24
Reputation: 774

Post » Tue Mar 26, 2013 9:56 am

https://www.dropbox.com/s/xxc3exm8tgcnsnd/example-q850kp091z2x.capx fixxed it but there is still 1 bug.

Example:

Click on Point 18 -> 1 -> 5 -> 1, the player dont moves again to 1 but if you click 18 -> 1 -> 5 -> X -> 1 he has no problems... This is cause my new check on the last 2 indexes of the array. I have no idea how to fixx this.

With some luck any one else, got an idea.
B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Next

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 18 guests