• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Setting Actor Tint Color

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,178
You could probably do it via actor messages to the main actor of the unit. I am still not too sure if you can issue all actor actions but even if you can not you just need to hard code some events for the actor that on a certain message change it to a certain colour.

You will also need some sort of map to convert color to tint commands. Perhapse map these commands to the player directly even as you could then use an array lookup.
 
Level 8
Joined
Jun 1, 2008
Messages
341
thanks for the advice, ive sorted it, but im not sure if its the best way, can anyone let me know if theres any faults :)

  • Variable - Set Color = (Color((Current player (Owner of Temp Unit 2) color)))
    • General - Custom Script: ActorSend(DataTableGetActor(true, ("PlayerMarine" + FixedToString(UnitGetCustomValue(lv_tempUnit2, 5), c_fixedPrecisionAny))), ("SetTintColor " + libNtve_gf_ConvertColorToString(lv_color)));
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,178
You probably just want to store the unit and then from the unit's actorscope gets it's main actor. This would save using the datatable and a custom value on the unit making it easer to manage (reduces coupling to non actor systems). It probably would also be faster.
 
Status
Not open for further replies.
Top