Stanley Sathler Posted December 3, 2011 Share Posted December 3, 2011 Hi guys, Can I use onMarkerHit with a marker created in Map Editor or I must use only createMarker() for this? If so, how can I use? Thank you, Sathler. Link to comment
^Dev-PoinT^ Posted December 3, 2011 Share Posted December 3, 2011 (edited) ..... Edited December 3, 2011 by Guest Link to comment
unknooooown Posted December 3, 2011 Share Posted December 3, 2011 (edited) What Solidsnake14 says Edited December 3, 2011 by Guest Link to comment
Castillo Posted December 3, 2011 Share Posted December 3, 2011 Dev-Point, that was not his question. local myMarker = getElementByID("My Marker ID in A map File") -- We get the marker element from a ID in the map file. if (isElement(myMarker)) then -- We check if the marker exists. addEventHandler( "onMarkerHit", myMarker, MarkerHit ) -- attach onMarkerHit event to MarkerHit function end function MarkerHit( hitElement, matchingDimension ) -- define MarkerHit function for the handler local elementType = getElementType( hitElement ) -- get the hit element's type outputChatBox( elementType.." inside myMarker", getRootElement(), 255, 255, 0 ) -- attach the element's type with the text, and output it end Link to comment
Stanley Sathler Posted December 4, 2011 Author Share Posted December 4, 2011 Solidsnake, thank you very much. You're clear with your answer, I like that. Hugs, Stanley Sathler. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now