From waypoint to waypoint?

For questions about using Classic.

Post » Wed Dec 02, 2009 12:21 pm

Can't seem to get this to work. I'm trying to make an object go to a certain spot on the map but first it goes to several other parts. I tried:

If [condition],then go to waypointA
-->on arrived at a waypoint, then go to waypointB
--->on arrived at a waypoint, then go to waypointC
etc.

But what happens is that it seems to circle around waypointA only which means, it not going pass the other 2 sub events.
B
10
S
5
G
8
Posts: 203
Reputation: 4,395

Post » Wed Dec 02, 2009 12:58 pm

If you want it to go to a set list of waypoints, use "Add waypoint at" several times, such as:
Start of layout:
- Add waypoint at 53,200
- Add waypoint at 125,180
- Add waypoint at 100,150

If you want it to go to one spot, ignoring all the waypoints you've set previously, use one of the RTS "Move to" variants.

At least I assume that should work. The "Add waypoint at mouse" and "Move to mouse" actions worked this way.
(I.e., on left click: Add waypoint at mouse. On right click: Move to mouse.)
B
3
S
1
G
3
Posts: 82
Reputation: 1,189

Post » Wed Dec 02, 2009 4:05 pm

[quote="TheJanMan":2v7yj83x]Can't seem to get this to work. I'm trying to make an object go to a certain spot on the map but first it goes to several other parts. I tried:

If [condition],then go to waypointA
-->on arrived at a waypoint, then go to waypointB
--->on arrived at a waypoint, then go to waypointC
etc.

But what happens is that it seems to circle around waypointA only which means, it not going pass the other 2 sub events.[/quote:2v7yj83x]

Events only cover one tick. In other words you cant give it more than one place to go in one tick. You'll have to add separate events, with a specific trigger for each waypoint. You might even consider the timer behavior, or timeline object.... function perhaps.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Thu Dec 03, 2009 12:07 pm

Hmm I'm a bit confused though. I was thinking, would it be an alternative if I make invisible dots in a layout and name them with something like "pointA". and use those dots rather than waypoints?
B
10
S
5
G
8
Posts: 203
Reputation: 4,395

Post » Thu Dec 03, 2009 2:21 pm

[quote="TheJanMan":sewywumn]Hmm I'm a bit confused though. I was thinking, would it be an alternative if I make invisible dots in a layout and name them with something like "pointA". and use those dots rather than waypoints?[/quote:sewywumn]
I'm also confused, are you still thinking of using rts behavior?
Also, why are you asking this? It's up to you to determine if it's an alternative solution. It depends on what you want.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Fri Dec 04, 2009 3:35 am

Yeah I guess, but I'm just asking opinions cuz I might do something unresourceful again. So yeah.

About the rts behavior, I'm still using it.
Like if an object needs to go to waypoint C, it needs to go to waypoint A and B first.
Ex.
If waypointA is overlapped, then go to waypointB
If waypointB is overlapped, then go to waypointC.

This would give them a little accuracy on where to go. Cuz if I just let go directly to waypointC, it might go on a different route everytime it needs to go there.
B
10
S
5
G
8
Posts: 203
Reputation: 4,395

Post » Fri Dec 04, 2009 9:34 am

Strange. I found "add waypoint at mouse" works, it will queue them up, but it doesn't work if I do "add waypoint at object" a few times in a row, each time with a different sprite. Same with "add waypoint at position". It just doesn't move. I assumed the example I gave would work, sorry. :?
B
3
S
1
G
3
Posts: 82
Reputation: 1,189


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests