• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Setting Actor Tint Color

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,225
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 64
Joined
Jan 18, 2005
Messages
27,225
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