Strange problem with Arrays

For questions about using Classic.

Post » Fri Nov 26, 2010 9:29 pm

Yo! :D

I've been experimenting alot with functions and arrays lately and have encountered a problem that i can't really grasp the logic of.

A reconstruction of the problem:
http://www.mediafire.com/?48tm2xq8cw4rdvj
(Run it in debug mode and select the array to see the problem)

The problem seems to arise when I try to store something in an array at the the exact same time as I store something else (or that is what I assume I am doing). This results in only one of the values being stored.

In my eyes it has to be some kind of bug, but undoubtedly it's surely my inexperience that blinds me from the real problem once again :P.

Thankfull for any kind of comments!

/Maisey
B
4
G
2
Posts: 8
Reputation: 716

Post » Sat Nov 27, 2010 10:34 am

I think it has something to do with the picking or collisions for that matter, as text objects aren't too great for that. Text objects don't even have collision conditions.

Still it seems to be easily fixed by adding a For each object loop, like this:

B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Sun Nov 28, 2010 2:01 pm

Amazing! :D

Thanks a bunch! Once again I'm looking the wrong way. ^^
Though I don't fully understand the need for the 'For Each Object' in this particular case (since 'collision with' should automaticly picke the right object),
but I guess it's true what you say about text objects (not built for collision).

Thanks again!
B
4
G
2
Posts: 8
Reputation: 716

Post » Mon Nov 29, 2010 12:14 am

A bit off-topic... I don't know how this would work, but I wish we had a feature integrated with the forum where we can lasso events (or an entire block of events) and then copy and paste them into the forums as a picture. I've never liked seeing them typed out, the picture always communicates better to me because it's exact in every way.

I find the pics to be so much more helpful than just text, but I think the current act of taking a screenshot, cutting the screenshot, and then uploading it to some site may be discouraging people from posting pics of event examples.
B
12
S
4
G
3
Posts: 426
Reputation: 2,458


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests