need some help on this loop

For questions about using Classic.

Post » Sat Oct 03, 2009 1:31 pm

i have two different loops, one to setup 10 targetpoints and i gave them a pv "index" of indexloop

and one to create 10 instances and gave them a pv "index"

how would i get the multiple instances each go to one of the targetpoints

i would like to sort tru the instances "index" and say go to targetpoint.x targetpoint.y

but i cant figure out how to pick the correct targetpoint from the 1st loop, how would you write that?
B
2
G
3
Posts: 72
Reputation: 994

Post » Sat Oct 03, 2009 7:53 pm

nobody? im really stuck on this
B
2
G
3
Posts: 72
Reputation: 994

Post » Sat Oct 03, 2009 7:59 pm

Can you explain it better? I read it twice and don't understand what you are trying to do. That's probably why you don't have any responses.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Sat Oct 03, 2009 8:16 pm

basicly i create 10 points
then i create 10 ships
then i say 10 ships go to .x .y of the 10points

so how would i say in the

for 10 ships go to location x y , and each go to the 10 different points

they all go to the same point, so its a picking problem, but dont know how to fix it
B
2
G
3
Posts: 72
Reputation: 994

Post » Sat Oct 03, 2009 9:07 pm

Can you post a .cap of what you tried?

I'm not sure why you can't in one loop first generate a point, then generate a ship to go to that point. If you wanted to first generate all the points, then generate all the ships, then make all the ships go to the points you could always put the points into an array and then place your ship based on the values in the array.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Sat Oct 03, 2009 9:46 pm

well i just managed to get them to the point i wanted,
i used nested loops, but i had to setup a run once event on the top loop, and now i cant do what i planned,

so i want the physic of enemy1(force) go to the position and continue go to that position

here's the cab,

http://www.4shared.com/file/137366871/9 ... /loop.html

thanx for reply's
B
2
G
3
Posts: 72
Reputation: 994

Post » Sat Oct 03, 2009 10:36 pm

Unfortunately, I haven't messed with physics or picking issues much so I'm not going to be able to help you out on this one.. at least not without learning about it myself.

However, you are simply placing the ships at the x and Y location. If you want them to travel there you will need to probably do a "set force to position" action. At least that is my guess.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Sun Oct 04, 2009 12:45 pm

no prob scidave, i have managed it to work, finally... pheww my head was nearly exploding
B
2
G
3
Posts: 72
Reputation: 994


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests