Collecting enough "coins" to open new path

For questions about using Classic.

Post » Thu Oct 01, 2009 3:23 am

I see what you mean. You need to do two things:

1. In layout 5 there is an array "destroyed things". Change the X value from 20 to whatever value you think is needed to hold the gems and other items you will destroy. I put it at 50.

2. Copy the array to all layouts that have gems or other destroyable items in them.


That's it. Then it will work. :-)


If you want to add things like the wall to stay destroyed then just add the wall sprite to the destroyed family and add it to the destroyed array... like I did with the gems.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Thu Oct 01, 2009 3:39 am

Wow that was fast hehe. Ur really great man. Thanks for all the help. Theres one problem still tho. They reappear still. When i leave the room they come back. I dont know what im doing wrong. Also, do i put the total amount of gems for the layout in the X or do i put the total amount in the entire game in the X? Sorry if i come off annoyig, im just really frustrated by this. I thought it would be easier since its been done in Metroid that was made in the late 80s hehe.
Ill be sure to list u in the credz if im one of the lucky few that manages to finish their game :D

Heres what i have so far...
[url:law3he7j]http://www.mediafire.com/?sharekey=3b4f5327563ac81b7432d3c9683f450ae04e75f6e8ebb871[/url:law3he7j]
B
2
G
3
Posts: 21
Reputation: 892

Post » Thu Oct 01, 2009 5:25 am

I updated the .cap to show the changes. It seems that the array [u:27bep7d5]must exist in all levels[/u:27bep7d5] the player walks through. This is kinda a "bug" in Construct since the array should be global to begin with and exists in all layouts.....

Also the X will hold the destroyed items for all gems in all layouts. Because of this, the X should be a value higher than the sum of all gems. Another option is to have an array per layout (but still global). Then the X value could be smaller.

http://www.box.net/shared/j83ip3ou6i

[quote="SexyPoot":27bep7d5]I thought it would be easier since its been done in Metroid [/quote:27bep7d5]
It's amazing just how complex the code for simple looking games can be.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Thu Oct 01, 2009 6:07 am

I cant thank u enough for all ur help. I hate to tell u this but theres still something up in the game hehe. I added more Gems and cranked the number of Gems to 30. I also craned the overall number u can get to 100. I figure i have a high number so i can add as many as i want as long as dont go over 100. Well anyways, i added 1 gem to the secret room to the left in the starting room. But when i get that one, another disappears in room 5 on the left. I dont get it! So far ur the one thats been helping me the most so i thank u again. U have no idea how grateful i am. Thanks.

[url:29p0ta8c]http://www.mediafire.com/?sharekey=3b4f5327563ac81b7432d3c9683f450ae04e75f6e8ebb871[/url:29p0ta8c]
B
2
G
3
Posts: 21
Reputation: 892

Post » Thu Oct 01, 2009 11:00 am

This sounds like a good problem for you to troubleshoot. 8) Here are some tips/questions to help you out.

1. What is the X and Y coordinate of the gem in the secret room? What is the X and Y coordinate of the gem in layout 5? Are they the same?

2. What mechanism is used to determine if a gem should be destroyed? Can you think of a better way? For example, would using the UID of the object work? Would using the Layout of the object help to solve the problem?

Once you answer these then you should be able to fix it.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Thu Oct 01, 2009 5:40 pm

Well I checked it and yeah, they are at the same X and Y. I moved it so it works now. The crate wont go away now so ill look into it. Im not sure about ur second question. Im new and still learning. Im not sure what ur asking. hehe, im sorry. Ill try to figure it out anyways.
B
2
G
3
Posts: 21
Reputation: 892

Post » Thu Oct 01, 2009 8:39 pm

[quote="SexyPoot":1rmn7tov]Im not sure about ur second question. [/quote:1rmn7tov]

I was just pointing out that you need to understand the events I added (that check X and Y) to fully solve your problem. Take some time to experiment with the tutorials and read the wiki. If you get stuck down the road then I'm sure someone here will be happy to help!
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests