How do I fix this Invisibility Issue

Get help using Construct 2

Post » Tue Aug 05, 2014 2:08 am

www.dwbailey.com/images/lockingOnMap.capx

The Map Layer is using Event sheet 4.
Goal: Have a Unlocking level system, Player returns 20 nuts the level Unlocks, this seems to work.
When on the Map(press Enter during game, go to map , press Z) the player can move the Map Selector Icon that I have made, as it overlaps the numbers it either says LOCKED or RETURN 20 NUTS TO UNLOCK NEXT LEVEL......i am using a invisible system....make text visible when var is greater than 20, (for example)...

my issue is this, some reason the game is lagging, meaning on the map , text is carrying over and being visible when it should not....for example when the Acorn Icon is over The intro map, zero text should show up...but when i start moving around the Map and then go back to the Intro Map level it shows the text that should only be visible when the Map selector Icon is over that particular sprite....and I have no idea if I just have to many Events or what.
hopefully it makes sense..kind of hard to explain.
http://gamejolt.com/games/platformer/sq ... uts/18498/
B
9
S
2
Posts: 272
Reputation: 1,632

Post » Wed Aug 06, 2014 1:05 pm

Can you post a capx?
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Wed Aug 06, 2014 1:36 pm

Your event sheet is a huge mess. :) I'm optimizing it right now... Posting soon.

[EDIT] Man... It took a lot more time than I thought. You have tons of redundant events and they are certainly affecting this visibility setting.
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
19
S
5
G
1
Posts: 518
Reputation: 2,703

Post » Thu Aug 07, 2014 11:56 am

Here it is. Check if all functionality is there. Note that I deleted things that became unused and renamed other stuff. The code is far simpler now and I believe everything is working fine. Read the comments in the code, I put then there to guide you.

Here's the .capx:
http://examples.gamesintheattic.com/lockingOnMap.capx


Some tips

Avoid having several text objects with the same content and functionality. If you need a text to change upon selection, just change it by code, instead of piling fixed text objects and controlling their visibility.

Avoid having several identical sprites. For instance, you don't need a different lock sprite for each level if they'll look the same. Just copy and paste the same sprite on your game, since each instance is independent.

I'm sure there's a lot of optimization to do on other event sheets, but, unfortunately I couldn't take a look at them, due to lack of time. :(
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
19
S
5
G
1
Posts: 518
Reputation: 2,703

Post » Mon Oct 20, 2014 12:23 am

hey bruno, just saw this, thanks man. ill check that out
B
9
S
2
Posts: 272
Reputation: 1,632


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 29 guests