Instance variables

0 favourites
  • 5 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • I am probably using Instance Variables incorrectly but I was watching the Memory Card Game video tutorials and I can't figure out what I've got wrong...

    I've got two different methods of spawning items my Large and Small use the same method, my Medium uses a method closer to the video. Neither ones seems to be doing the trick...

    I'd like to spawn a unique colored number per spawn set when they spawn and unchanging until they fade and are destroyed.

    I've probably built this way too complex or there are probably a lot better ways but this is what my brain built so here I am...

    I assign Instance Variables to the name for each instance but when the Animation Frame set is changed they all change...

    .capx posted here:

    dl.dropboxusercontent.com/u/39000273/CleanTest.capx

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It may help.

    construct.net/en

    construct.net/en

  • I think I know why now that I'm watching it run... Its working I just need more animation frames, enough to satisfy the amount of unique frames visible at any time.

    That changes my question... I am trying to prevent items spawning on top of each other using an Overlapping object check at spawn but that is causing some Animation Frames to be skipped because its a timed cycle... If I change the cycle to a When I get nothing...

    I should probably make a new Post for the changed question...

    Thanks!

  • I read through the two posts listed and they don't seem to address my problem. They relate more to how to connect items together and I need to assign Animation Frames to instances of items as they are created and have them not shift.

    Watching even closer now I can see I have something very wrong going on. Some of my emitters are putting out objects that are changing animation frame with the cycle and some objects are not.

    I am totally lost...

  • Ok I got it... I had to add an "On Created" action to set everything I couldn't just change the numbers after spawn. The post above:

    construct.net/en

    sort of helped because I could see the "On Create" action and decided it might fix my problem... it fixed all kinds of problems actually.

    Thanks for taking a look and for the post. It helped a lot in the long run!

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