I'm blocked

Get help using Construct 2

Post » Thu May 22, 2014 8:00 am

JosepM wrote:News questions are:

How avoid the "undefined value" error when try to read one array position?
How find into an array for a value and replace it? I found "TheindexOf" and "TheValueOf"
I guess that if the search value work fine is better than the use of repeat.

Thoughts?

Salut,
Josep M


1) This is because you are adding extra elements to an array. So the blanks are undefined.
2) Load your data into array, then you use theseto manipulate the data as per usual. Have a look at this - Very good tut. Download the animalscomplete.capx and go through it. Handles everything you will need.

Will have a look at your screenshots etc when I get some time. This week is crazy :(

Edit: Don't use buttons, they don't work or give you grey hairs (for tablets) or textboxes either.
Use sprite as button. And spritefont. (better for design, better for game)
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,728

Post » Thu May 22, 2014 8:30 am

Hi @Dutoit,

Yes, the button is only for testing the calls to functions on this prototype. Thanks for your advice. :)

Edit: To use the "IndexOf" for the X only in 2D array or 3D array? is posible or search for the entire array?

Salut,
Josep M
B
18
S
2
G
2
Posts: 64
Reputation: 1,225

Previous

Return to How do I....?

Who is online

Users browsing this forum: blackhornet and 5 guests