MAMMUTH Posted June 29, 2023 Share Posted June 29, 2023 (edited) Hi guys, I'm trying to create a marker that displays the distance to the enemy vehicle (when pressing ALT). Therefore, I created a custom macro and use it in the markersAliveExtended.xc. What's working: - Calculate the distance between me and an enemy - Show it as a text in an XVM OTM marker at the game start - Re-calculate the distance (and print it to the log) based on silly debug events like "onHealthChange" However, I have three problems/questions: - I can already hook into events to re-calculate the distances to all vehicles and update an internal state variable. However, XVM does not call my macro again to receive the new value -> how to make the OTM text dynamic? - What would be "good" events to hook into to update the distance to all vehicles? Is there a simple frame/time based event? - Is adding "custom macros" actually a thing or are all macros just coming with XVM itself? How would I "package" this mod to send it to friends? Attached you find a few debug files of what I'm doing. Any help or hints on how to make dynamic custom OTM markers is appreciated! <3 distance_macro.py markersAliveExtended-PARTIAL_FOR_ILLUSTRATION_ONLY.xc Edited June 29, 2023 by MAMMUTH @ Quote Link to comment Short link Share on other sites More sharing options...
Kurzdor Posted July 11, 2023 Share Posted July 11, 2023 @MAMMUTH This isn't possible because OTM doesn't allow to be dynamic. You can use Lesta MT code as reference. BTW, I tried to do it but it wouldn't work because of the reason above. @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.