need some help

For questions about using Classic.

Post » Tue Oct 13, 2009 6:01 pm

[url:760fd7j8]http://www.4shared.com/file/140630374/9c47cfe3/formation.html[/url:760fd7j8]


hey guys, so i wanted to create some kind of squadrons, based on an image with imagepoints

on creation of the squadron image , 5 ships are send to each of the imagepoints,

that works, but i have trouble to get the next ships to go to the new squadron

the picking seems right, but i cant get the imagepoints from the next squadron

press "a" for creation of squadron

its now setup (to work) for 2 squadrons
B
2
G
3
Posts: 72
Reputation: 994

Post » Tue Oct 13, 2009 11:24 pm

For the 2nd sqaudron it is because your ship's index is too high compared to the image points.
Say for the ship with an index of 7, your telling it to go to an image point 7 (which doesn't exist) so you just need to go -5 for the greater than 5 index event thing.

(click for full size)


or you could go something like
[code:1mtt5ogz]
formation.ImagePointY("pos" & (loopindex-((formation.Value('formationnr')-1)*5)))
formation.ImagePointX("pos" & (loopindex-((formation.Value('formationnr')-1)*5)))
[/code:1mtt5ogz]

to save having to do seperate events for each formation.
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Thu Oct 15, 2009 5:14 pm

hey man, thanx for that, really helped me out, didnt realize that the loopindex counted up beyond the 5,
thx
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