Drawing on Layout from MiniMap

0 favourites
  • 5 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • 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

    <font color="blue">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!!!! </font>

    Can anyone Help? Here is the Link http://www.box.com/s/a1c37e12480b56fa21bc

  • 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...


  • 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...

  • 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...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • BTW- With R85 the Canvas Recount Bug has been fixed... Which tweaks my CAPX a bit, but it still works.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)