devildog664 25 Posted October 3, 2022 So I’m trying to run a code whenever I click on the map. I have been trying to use onclick but not having any luck. I am able to click my custom icons on the map but that’s it. Currently I click on a custom icon which then brings up a small GUI. I then want to be able to click off the GUI any where on the map and have it close. I have been trying many things like SCR_MapEntity mapEntity = SCR_MapEntity.GetMapInstance(); Widget mapWidget = mapEntity.GetMapConfig().RootWidgetRef; m_ModalHandler = new SCR_RTS2(); mapWidget.AddHandler(m_ModalHandler); m_ModalHandler.m_OnClick.Insert(TEST664); I also tried OnModalClickOut but no luck. If anyone can just point me in the right direction that would be great. Share this post Link to post Share on other sites