Array Grid Display Problem

0 favourites
  • 6 posts
From the Asset Store
Snap to visible grid - perfect solution for any game genre
  • Hi,

    I'm following the 2D arrary tutorial here: construct.net/en

    I've named my array "grid", and is set at x=4, y=4, z=1. My sprite is named "abc1" with four different color block animations. Each animation is set to 0 speed and no loops.

    Running a preview presents me with a non-symmetrical grid that cycles through random colors very quickly almost as if I have an "every tick" event set - which I do not. I was able to stop this by adding a "trigger once while true" event. Below are screen grabs of what the array looks like when previewed and the event sheet.

    Event Sheet

    Results

    Why is my array displaying this way and why do I have to use the "trigger once while true" event in order to keep it from looping randomly through the animations non-stop?

    Any help would be greatly appreciated.

  • "Every tick" is an implicit condition. Even if you don't have one, your conditions are evaluated every tick and actions are executed if the conditions are met. Just add a "on start of layout" or something above both your events. (You can also put all actions in the same event, no need to cycle your array twice.)

  • Much thanks for the info. Any ideas why the array grid is displaying the way it is?

  • Use ABC1.Width and ABC1.Height instead of Array.Width and Array.Height.

  • You, good Sir, are the man. Staring me right in the face. Isn't that usually the case?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, and we oftentimes need someone else to point out the obvious !

    No problem, glad to help !

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