[Solved] How can I select one object?

I’m creating a project with RTS elements. There are units that you can choose from. The problem is that when you select one object, all of the same type are selected. How can I ensure that only one specific object is selected?
I tried to solve this problem in different ways.

If you need any clarification on the “code” or anything else, I will answer.

1 Like

I don’t know about all of the events but inverting the cursor is on event usually doesn’t work as expected.

The condition isn’t checking if the touch or cursor isn’t on any planets. It’s checking if the cursor isn’t on which planets. If there were 9 planets then unless the planets were stacked, the cursor would always not be on either 8 or 9 planets.

Instead, try puting a non-inverted cursor is on condition inside of a NOT condition.

It can be confusing since it sound similar. Inverting a condition inverts most conditions while not inverts the result.

1 Like

I tried it, but it doesn’t work. Also, in some other events, the cursor on condition does not work inversly, although I have no idea if it actually works as it seems… For example, I created an event that displays the amount of HP of those units over which the cursor is hovered. It works. But it’s not possible to single out one unit. By the way, sorry for my English.

What is the set action? Is that an extension?

I even tried to do it differently. Like, first I set the selection through a variable, and then the variable creates the selection in the extension. Although, perhaps this was not enough, and it is worth abandoning the expansion completely.

Yes, I tried to do it entirely through variables without expansion, and it worked.

1 Like

Good to hear. What was the set extension. I don’t recognize its icon.

This is RTSUnitSelection

1 Like