Game Development Community

Event order

by yurembo · in Torque 2D Beginner · 11/19/2013 (11:02 pm) · 5 replies

for example, in my game there are three objects of three classes, when T2D generates an event (like OnTouchUp) I wonder what is the order and how is it declare? I think if I set layer number, but this doesn't change an order. How can I declare an event order?

#1
11/20/2013 (1:15 am)
by order do you mean function?

When the user clicks the mouse or presses a key, onTouchDown will be received by the SceneWindow, as long as you set the following to [b][/b]

SceneWindow.UseWindowInputEvents = true;

You can find all the information on how to deal with mouse, touch input and keyboard Action Maps in the Input Guide
#2
11/20/2013 (1:29 am)
No, I mean:
ObjA is on layer 31,
ObjB is on layer 30,
ObjC is on layer 31.
all these objs physically one on other, graphic output order is correct but OnTouchUp raises no this order
#3
11/20/2013 (1:54 am)
sure, this docs makes it clarify: for the first time background's event raises up and then an event of the object that is on a background raises up
but I have a third object which is dragged and an event of this object is raises first
#4
11/20/2013 (2:03 am)
Could I replace these events?
#5
11/20/2013 (1:10 pm)
I chose another way