Jump to content
Korean Random
Sign in to follow this  
MAMMUTH

Help with developing custom dynamic OTM

Recommended Posts

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

semi-working-screenshot.png

distance_macro.py markersAliveExtended-PARTIAL_FOR_ILLUSTRATION_ONLY.xc

Edited by MAMMUTH

Share this post


Link to post

Short link
Share on other sites

@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.

Share this post


Link to post

Short link
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...