How to only control the selected object

Get help using Construct 2

Post » Sat Oct 01, 2016 2:35 pm

Currently I have it set up so that I have duplicates of the same sprite and if I click on one of them, the camera focuses on it and I can control it. The only issue is, when I can control it, it controls/moves all the others as well. Is there a way to make a movement function that will only apply to the selected duplicate sprite?

Currently using the Platform behavior for the duplicate sprites. Any help is greatly appreciated :)
I like giving game advice more than I actually like making games ;)

Image
B
40
S
15
G
3
Posts: 129
Reputation: 4,651

Post » Sat Oct 01, 2016 2:41 pm

Set an instance boolean on the sprite i.e. isSelected. Then on sprite clicked set the boolean to true. Then set up logic - platform behaviour is enabled if isSelected=true.
B
46
S
16
G
79
Posts: 2,170
Reputation: 46,857

Post » Sat Oct 01, 2016 3:04 pm

@plinkie Thanks, I already had something like that set up initially, but all of the sprites are still effected when I try to move at that point.
I like giving game advice more than I actually like making games ;)

Image
B
40
S
15
G
3
Posts: 129
Reputation: 4,651

Post » Sat Oct 01, 2016 3:10 pm

You'll need to disable the platform behaviour too when they're not selected. Failing that, you'll have to post a capx as logic might be getting affected by something else.

I made this quick capx here : https://dl.dropboxusercontent.com/u/495 ... ected.capx
B
46
S
16
G
79
Posts: 2,170
Reputation: 46,857

Post » Sat Oct 01, 2016 3:29 pm

@plinkie ahh I see what you meant now after making that capx. Works perfectly, thx! :)
I like giving game advice more than I actually like making games ;)

Image
B
40
S
15
G
3
Posts: 129
Reputation: 4,651


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests