Discover object user under mouse without polling

Get help using Construct 2

Post » Fri Mar 17, 2017 8:54 pm

Is there anyway to discover the object the mouse is over without polling every object? Thanks
B
10
S
5
G
3
Posts: 19
Reputation: 1,974

Post » Fri Mar 17, 2017 9:07 pm

What do you mean "discover"?

The Mouse object has CursorOverObject event - just know it will trigger 60 times per second, so add Trigger Once While True if you want it to act like a Trigger.
B
103
S
35
G
16
Posts: 1,227
Reputation: 17,198

Post » Fri Mar 17, 2017 9:19 pm

c2 method polling objects
Mouse over obja action...
Mouse over objb action...
Mouse over objc action...
I want discover object under the mouse without the above polling every possible object

Method I am looking for would look like

objx = Mouse over any object
B
10
S
5
G
3
Posts: 19
Reputation: 1,974

Post » Fri Mar 17, 2017 9:22 pm

Use families
Mistakes were made.
B
60
S
30
G
134
Posts: 1,949
Reputation: 75,375

Post » Fri Mar 17, 2017 10:57 pm

yes, put all your objects in a family in order to not have to test each one individually.
B
103
S
35
G
16
Posts: 1,227
Reputation: 17,198


Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot], Themrcoolio and 8 guests