Instance picking -- where am I going wrong here?

Get help using Construct 2

Post » Mon Mar 14, 2016 11:07 am

Hi all - apologies if this is vague; I have a bunch of red squares that are in a family called map_items - these are pinned to a larger purple square so that they can all move around together. When you click on a red square a boolean variable is toggled - and if on, the square changes to green. Now what is meant to happen is if the variable is on that square is to be positioned over another target square - and since everything is pinned together the purple square and surrounding squares move around with it. Now if you look at my example you will see 4 red squares pinned to a purple square, if you click the top left one it works perfectly. But if you (reset the .capx) click any of the other ones, they will toggle on however they won't set their position to the target square like the top left red square does. Can anyone explain what is going wrong in my events? Thanks very much ;)

capx here: https://www.dropbox.com/s/mm04jbpyg8tq4nv/help.capx?dl=0
B
67
S
25
G
4
Posts: 212
Reputation: 7,084

Post » Wed Mar 16, 2016 10:39 am

Try this:
Image
For a different thing but the logic should apply here.
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 534
Reputation: 19,620

Post » Fri Mar 18, 2016 3:47 am

Thanks for your help, that certainly helped me verify that I was picking the correct instance and it's highlighted a deeper problem with what I'm trying to do - seems multiple objects pinned to one and other can't be moved in the way I need to move them. Thanks again.
B
67
S
25
G
4
Posts: 212
Reputation: 7,084


Return to How do I....?

Who is online

Users browsing this forum: DrKoala, irina, mindragon73, zenox98 and 22 guests