MQ2HUD and using Outer Variables

NeroMorte

New member
Joined
Jan 20, 2008
Messages
12
Reaction score
6
Points
3
Hey all is there a way to fix this

in my hud i have
TargetID_AMT= 3,4, 350,48, 255,255,255 ,${If[${Target.ID}, ${If[${Target.ID},${If[${Target.State.Equal[DEAD]}, ${Target.ID} , ${Target.ID} ${CombatTargetID} ]},]},]}

and my Macro i have
/declare CombatTargetID int outer 0

if i load my macro after mq2hud has been loaded my Variable CombatTargetID = NULL Not matter if i /deletevar or /varset my CombatTargetID it still says NULL

Now if i /plugin mq2hud unload Then load my macro my Variable CombatTargetID = 0 and i am able to use /varset and it update

am i doing something wrong or is there a setting in mq2hud i need to enable/disable or some extra plugin to allow Variables in MQ2HUD

Thanks for any input
 
  • Like
Reactions: EQDAB
So i Found out if i change the Type to 17 it loads Outer Variable correctly

TargetID_AMT= 17,4, 350,48, 255,255,255 ,TEXTHERE

instead of TargetID_AMT= 3,4, 350,48, 255,255,255 ,

Not sure if its because only when macro running 16 and display in non-full screen 1 = 17 is why it works or what

Only Type info i can find is
  • Type can be a combination of the following (just add the numbers):
  • 1 Display in non-full screen mode
  • 2 Display in full screen mode ("F10 mode")
  • 4 Based on cursor location
  • 8 Display at charselect
  • 16 Only parse if a macro IS running
 
  • Like
Reactions: EQDAB
Well it worked Once now my Variable CombatTargetID still showing NULL so still need help if anyone is able too
 
  • Like
Reactions: EQDAB
Use global vars instead of outer in your macro with Defined[] condition.
 
  • Like
Reactions: EQDAB
You can create a file named AUTOEXEC.CFG and put all your global variable definitions there.

EX:
/declare gMobID int global 0
/declare gRezID int global 0
/declare gBurn timer global 0

Then you can use those in your MQ2HUD.INI
 
  • Love
Reactions: EQDAB
Hey got one more question on Variables inside HUD

So i got variables like Tashed${Target.ID} declared as outer and use to work fine in my old mq2 build but this mq2hud not like macro variables in it.

anyways i cant declare them as global because i dont know what the Target.ID number is going to be.

on MQ2 Wiki https://www.macroquest2.com/wiki/index.php/DataType:targettype

i notice you can do ${Target.Slowed} and ${Target.Tashed} etc.. bassically what i was trying to do but i do that in mmo mq2 and i get NULL is there i plugin i need to add to allow Them Target DataTypes or is that something that can be added.

Also open to any other way to do this just want hud to show if target tash/malo, slow,cripple,root,snare

Thanks for any help
 
  • Like
Reactions: EQDAB
Declare them as global and varset to what you need, that's how I do mine, even on emu. If you don't want to do an array, then check if it exists in your decl. I'm not sure how your details are, would have to see the hud data and know how you are setting these variables (example cut from macro or whatever). An example might be something like (to start with) ${If[${Target.ID} && ${Defined[Tashed${Target.ID}]}, ${Tashed${Target.ID}},0]} or whatever you want to see depending on conditions.

Anyway, I might be way off from what you're actually asking, so let me know with the code info if you need some more help, thanks.

htw
 
  • Like
Reactions: EQDAB