How do I work with stars without array

Get help using Construct 2

Post » Mon Aug 11, 2014 1:05 pm

I was looking for the same. Tbh i read some guides about arrays but i cant really comprehend arrays.
Maybe i will use frames and let you know if it works but as i have a full time job it will take quite some time.
B
22
S
5
G
2
Posts: 210
Reputation: 3,377

Post » Mon Aug 11, 2014 1:08 pm

Maybe this link could help just in case you didnt see it;

https://www.scirra.com/tutorials/311/level-select

i will try this step by step when i have time for it
B
22
S
5
G
2
Posts: 210
Reputation: 3,377

Post » Mon Aug 11, 2014 1:08 pm

You could do that using variables.
Easiest way I think would be to make one global object and give it a bunch of variables.
But for that many levels, Arrays would be much better - from data managing point of view. One Array could store all levels, level stars etc.. And for something simple as that Arrays are not that difficult.
ImageImageImageImage
B
157
S
66
G
42
Posts: 2,603
Reputation: 35,343

Post » Mon Aug 11, 2014 2:43 pm

When the level 1 is achieved create events such as hide the dummy button for the next level with lock symbol and make visible original button which has click connection to it.

It may works, not sure. But still this is a hectic job to do mate.
Image
B
31
S
7
Posts: 197
Reputation: 2,497

Post » Mon Aug 11, 2014 2:49 pm

I am also curious about the second question, the star count in the levels page. I can guess how to do that, but how to do that without increasing the count again and again for the same level.
Image
B
31
S
7
Posts: 197
Reputation: 2,497

Post » Mon Aug 11, 2014 2:53 pm

piszozo wrote:I was looking for the same. Tbh i read some guides about arrays but i cant really comprehend arrays.
Maybe i will use frames and let you know if it works but as i have a full time job it will take quite some time.


Thanks mate. Take your time. By the way that video I have checked it already. I can easily copy that method without understanding arrays but that is not what I wanted to do.
B
7
S
1
Posts: 51
Reputation: 507

Post » Mon Aug 11, 2014 2:55 pm

@shinkan if possible could you show me a demo for the star count.
If possible.
B
7
S
1
Posts: 51
Reputation: 507

Post » Mon Aug 11, 2014 3:50 pm

I used Dictionary object instead. For two reasons:
1. It's may be simpler to use than Arrays for you
2.
Z.PNG

You can't do something like that with global or instance variables.

...now I think I may accidentally make this a little bit to complicated for you xD
But you need to learn this anyway sooo ;P
You do not have the required permissions to view the files attached to this post.
ImageImageImageImage
B
157
S
66
G
42
Posts: 2,603
Reputation: 35,343

Post » Mon Aug 11, 2014 5:16 pm

@shinkan thanks mate. I have checked what you have done. It's quite interesting. I have also checked the manual on dictionary.

I need to stop changing the stars when it is already received higher stars
And
Also the star counts in the levels page.

But how to add stars to the star count and not add again and again for the same level.
B
7
S
1
Posts: 51
Reputation: 507

Post » Tue Aug 12, 2014 8:48 am

@animator I have followed your other post - viewtopic.php?f=147&t=111849. Now I am just wondering how to do that for this situation. @shinkan - How to add the stars to the star count only once, not every time it is achieved. And also if two stars are gained, it will says total stars gained 2. If the player plays the same level and gained three stars this time. It should say total stars gained 3 not 5 by add the new 3 stars.
Image
B
31
S
7
Posts: 197
Reputation: 2,497

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 26 guests