Simple solution needed. cap x attacted, advice on how to make it better please.

0 favourites
  • 5 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • Hello, I feel like this is a pretty basic question. But yet I find it confusing.

    Basically each level is locked. when the player finishes the level the lock removes.

    I have used separate locks and pinned each lock to the level number.

    Is it better to use the same lock, then just pick the lock with the UID?

    I will still need about 30 separate events for the pick UID anyway wont I? Unless I use a function with a parameter? but I dont see how that would work.

    Thanks

  • You need to get into the habit of using one object, not many lock objects. You would give the lock an instance variable for level which is a number that relates to that level. I'm interested to know what logic you used to determine which level was finished and which lock to remove.

  • Yeah, this is true Plinkie. I will change that tonight. Does adding more code use minimal memory.

    I'm terms of the end of level I was going to use a boolean.

    Something like,

    At end of layout, and lock 1 has booleen, set to true.

    Destroy lock.

    If boolean is true, and level 2 in touched, then go to level 2.

    Thanks plinkie

  • If each level is a different layout then you should be able to get away with - end of particular layout set global variable to x. Then back in the menu if lock.variable = to x, remove lock.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Cheers plinkie, I will be sure to do that. :-)

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