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
9
S
4
G
3
Posts: 13
Reputation: 1,833

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
101
S
34
G
16
Posts: 1,212
Reputation: 17,016

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
9
S
4
G
3
Posts: 13
Reputation: 1,833

Post » Fri Mar 17, 2017 9:22 pm

Use families
Mistakes were made.
B
57
S
28
G
115
Posts: 1,712
Reputation: 65,172

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
101
S
34
G
16
Posts: 1,212
Reputation: 17,016


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests