How do I Load Image/Text to specific position based on UID

Get help using Construct 2

Post » Thu Aug 03, 2017 3:57 pm

I am developing a matching game 4*4 SQUARE as in the image below:

What I have DONE:
[x] Create a array random16ImageWord= {"a","a.png","b","c","c.png","b"...}
[x] Create 16 BLOCKS (grouped in Pictures group) with UID = 33 > 48

Now I want to:
+ BLOCK with value random16ImageWord.At("Block.UID") contain ".png" will load IMAGE
+ BLOCK with value random16ImageWord.At("Block.UID") not contain ".png" will load TEXT

I am kind of sucess with these code:
Image

The result:
Image

However, my trouble is the TEXT OBJECTs have been creating continuously without stoppage...

Could you please check my .capx and help me out?

Thank you so much!

P.S: My .capx https://1drv.ms/u/s!AnUEszOwQCI1jdkz5ugf9Mk8Ckma_Q

My .capx contain the plugin (mkArray) to randomize array at https://www.scirra.com/forum/viewtopic.php?f=153&t=179478&p=1135190#p1135190

Alternative download link here: https://1drv.ms/u/s!AnUEszOwQCI1jdk0TD1_lkT8y0DI7Q
Last edited by gianghl1983 on Thu Aug 03, 2017 6:01 pm, edited 1 time in total.
B
24
S
4
G
1
Posts: 27
Reputation: 1,724

Post » Thu Aug 03, 2017 4:14 pm

Your .capx includes non-standard addons.

It may be best to either remove them (if possible) or guide users to where the addons can be found. Otherwise getting help might be problematic.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,422
Reputation: 59,530

Post » Thu Aug 03, 2017 5:59 pm

@zenox98:

Thank you, my .capx contain the plugin (mkArray) to randomize array at https://www.scirra.com/forum/viewtopic.php?f=153&t=179478&p=1135190#p1135190

Alternative download link here: https://1drv.ms/u/s!AnUEszOwQCI1jdk0TD1_lkT8y0DI7Q
B
24
S
4
G
1
Posts: 27
Reputation: 1,724

Post » Thu Aug 03, 2017 10:39 pm

If it was only the 'mkArray' plugin. No prop. But you are using more plugins.

Anyway.

Do not Use UID.
Use instance variables or containers to pick pairs of object.
https://www.google.be/search?q=scirra+p ... scirra.com
https://www.google.be/search?q=Scirra+c ... scirra.com

And if i may advise this. Use only UID to pick, when you retrieved that UID like 'a split moment' ago.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Aug 07, 2017 5:34 am

@99Instances2Go: Thank you, I found solution for my trouble by moving "Trigger Once" to the top of conitions.
B
24
S
4
G
1
Posts: 27
Reputation: 1,724


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, JackTYGA, Kin, worm1 and 30 guests