mouse down event triggers for overlapping items.
by Joseph Bosch · in Torque Game Builder · 10/29/2011 (7:54 am) · 2 replies
so I noticed that if you add mouse events to an item via a behavior
(IE)
%this.owner.setUseMouseEvents(true);
that if two objects over lap and you click where the objects overlap they both fire off their mouse down events. Does any one have any suggestions how to only get one item to fire off its mouse down events if click on overlapped items?
the only thing I can think of is set a value to the items then on click set a schedule, and say something like,
if a.x > b.x then a mouse event, only problem is that the second item would set the same schedule causing a's mouse down to fire twice which is not desired and checking for all this is going to be a pain.
(IE)
%this.owner.setUseMouseEvents(true);
that if two objects over lap and you click where the objects overlap they both fire off their mouse down events. Does any one have any suggestions how to only get one item to fire off its mouse down events if click on overlapped items?
the only thing I can think of is set a value to the items then on click set a schedule, and say something like,
if a.x > b.x then a mouse event, only problem is that the second item would set the same schedule causing a's mouse down to fire twice which is not desired and checking for all this is going to be a pain.
Associate William Lee Sims
Machine Code Games