How do I Invert SOL (Selected Object List)

Get help using Construct 2

Post » Mon Jul 28, 2014 8:24 am

How do I do this? Already thought of running an inverted pick condition, but that approach doubles the overhead. Is there any way to just invert the pick list?
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Mon Jul 28, 2014 11:55 am

Let's say picked object is overlapped by a detector. So the remain objects that were not picked will be not overlapped by any of these detector;
> system: object is overlapping detector (inverted) | do an action

That is my first solution.
Other method that also work is by inverted the instance variable (boolean);
> system: is picked (inverted) | do an action
ImageImage
B
108
S
49
G
23
Posts: 783
Reputation: 22,611

Post » Mon Jul 28, 2014 12:46 pm

Did you try else?
Image ImageImage
B
169
S
50
G
173
Posts: 8,316
Reputation: 110,276

Post » Mon Jul 28, 2014 5:13 pm

alextro:

The object in question (laser beam) as a collision polygon, but the object it is being tested against (a circular shield) doesn't. However, since there is only 1 shield, I could add a polygon. Actually, yours is a pretty good idea. Thanks :)

newt:

My first thought, but I found that else doesn't work that way: it won't invert a pick list.

Actually, there is a thread around from a couple of years ago where Ashley was discussing whether or not to have else invert SOL's in the context of a pick condition. However, he decided against it.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Mon Jul 28, 2014 6:02 pm

If I remember correctly, "Else" resets the SOL altogether.
B
71
S
30
G
25
Posts: 984
Reputation: 19,503

Post » Mon Jul 28, 2014 7:07 pm

Not sure what you want to do.
In my experience on of the better methods to break out of picking is to use a function.
Image ImageImage
B
169
S
50
G
173
Posts: 8,316
Reputation: 110,276


Return to How do I....?

Who is online

Users browsing this forum: 25games, Artcadev, Ashley, mcscooter, Soluna Software and 28 guests