[Solved] Array edumacation

For questions about using Classic.

Post » Mon Aug 31, 2009 5:18 am

I'm having trouble with Arrays. What I want to do is have it so that for every element, the value of the element is either one or two. The game then spawns a different block depending on if it is one or two. Currently, this doesn't really work--the game spawns 50 of the first block (there are 50 X values) and none of the second. Take a look at this.

What is wrong with this, and how do I fix it? Sorry, I'm just a bit frustrated right now.
B
4
G
3
Posts: 25
Reputation: 975

Post » Mon Aug 31, 2009 6:13 am

Can you post a .cap? From what I can tell the Value at Current.X will always return 1. This doesn't access the elemet with the 2 that you are looking for.

I think you want Value at Array.CurrentX, Array,CurrentY Equal to 0, 1, or 2. You need to check X and Y.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Mon Aug 31, 2009 9:51 pm

Thanks, that works splendidly.
B
4
G
3
Posts: 25
Reputation: 975


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests