System pick instance condition

Just started using Construct 2? Post your questions here

Post » Mon Mar 24, 2014 12:46 am

Hello, how does those conditions works ? I need to check if there is an instance under mouse position, and i thought of making condition "pick overlapping point". I did it, but i have no idea how to check if such instance exist. I need to perform an action ONLY IF there is no instance found under given position.

Another question: if i pick some instances with systems condition, how can i determine which particular instance I am using in actions ? Lets say I have action "set text to instance.variable" - if i pick more then 1 instance - how does it work in such situation ?
B
4
Posts: 8
Reputation: 216

Post » Mon Mar 24, 2014 6:43 am

Your first problem:

Mouse-> Cursor is over object


Second:
As far as I know it always picks the last created instance. It's always good to be precise when picking objects.
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Mon Mar 24, 2014 10:42 am

THANKS MAN !!! Mouse coursor over object is perfectly fine for this purpose :D


By the way documentation says something different of picking instances with mentioned condition:

"Pick overlapping point
Pick all instances of a given object type that are overlapping a point in the layout. The given X and Y position in the layout will be tested against the instance's collision polygons."
B
4
Posts: 8
Reputation: 216

Post » Mon Mar 24, 2014 10:52 am

yes, it picks all instances. But when you try to get an instance variable, it uses the object with the highest UID.
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Mon Mar 24, 2014 11:01 am

Here is a quick example capx that might help...

(There are, no doubt, other ways to do this)
You do not have the required permissions to view the files attached to this post.
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,812

Post » Thu May 08, 2014 10:42 am

RamPackWobble I wanted that but I could not figured it out. Thanks a million you are gr8 thanks again
B
245
S
39
G
15
Posts: 1,945
Reputation: 40,264


Return to Beginner's Questions

Who is online

Users browsing this forum: Anontelope and 1 guest