Drawing on Layout from MiniMap

Get help using Construct 2

Post » Sun Apr 01, 2012 1:52 am

I have a neat Mini star map in the upper left of the window that is created by filling the entire layout with stars, copying them to a canvas, and Downsizing that canvas. This becomes a "sector" on the Mini-map. The sector Number IS the Canvas IID. The original stars are deleted, and the process begins again until all sectors are drawn.

While this process is running, I am filling an array:
  • X0= Star.x, X1= Star.y
  • Y axis position accounts for the individual star (0 is first star, 1 is second ect.)
  • Z is the Sector number - which SHOULD correlate with the Canvas IID of the mini-map


Does that make sense? Anyways, when you click on the mini-map I want the Layout to re-draw the stars relating to the array Z axis matching the Canvas IID. But it looks like the stars dont match the sector in the mini map???? AND 0,0 of the Layout ALWAYS has a bunch of stars on it... WHY!!!!


Can anyone Help? Here is the Link [/URL]http://www.box.com/s/a1c37e12480b56fa21bcZetar2012-04-01 02:22:04
B
192
S
6
G
7
Posts: 213
Reputation: 10,178

Post » Sun Apr 01, 2012 2:13 am

OK, I figured out that for some reason, when I delete the primary instance 0 of the canvas at Startup, when I create new ones it starts with 1, 2, 3 ect... SO Array 0,0,0 is Blank...

Hmmm....
B
192
S
6
G
7
Posts: 213
Reputation: 10,178

Post » Sun Apr 01, 2012 2:20 am

OK, I am Revising my Request...   I fixed the Sector Re-draw with the error I found. But now, WHY IS 0,0 always spawning lots of Stars? - Reloaded CAPX in First post - please re-download...
B
192
S
6
G
7
Posts: 213
Reputation: 10,178

Post » Sun Apr 01, 2012 3:04 am

Solved - OK, so I figured out that my array is building the Axis depth at the Max, but because I am using a random amount of stars up to that MAX, The rest of the Array position fill with 0. Therefore, 0,0 on the layout spawns multiple stars...

If anyone cares, I just filled the array with -100 to start with, then delete any stars at -100x-100...
B
192
S
6
G
7
Posts: 213
Reputation: 10,178

Post » Thu Apr 05, 2012 8:42 pm

BTW- With R85 the Canvas Recount Bug has been fixed... Which tweaks my CAPX a bit, but it still works.
B
192
S
6
G
7
Posts: 213
Reputation: 10,178


Return to How do I....?

Who is online

Users browsing this forum: djcrazypants, marekmk and 6 guests