- Joined
- Feb 17, 2009
- Messages
- 291
Disclaimer: I don't know JASS
It is rather long, but it's just repetition. I wanted to emulate Diablo 2's stark tinting contrasts depending on the type of status a creature has (e.g. Blue for Cold, Green for Poison, etc.) and then make a priority list since some debuffs are more severe/multifaceted than others.
As you might imagine, doing this 10x a second murdered about 30 percent of my frames. Thankfully, every 1 second is BARELY noticable if at all, but the display is nowhere near as good of course. Is there a faster and less taxing way to do this?
EDIT: fixed the custom script at the bottom. I was very tired when I wrote that
It is rather long, but it's just repetition. I wanted to emulate Diablo 2's stark tinting contrasts depending on the type of status a creature has (e.g. Blue for Cold, Green for Poison, etc.) and then make a priority list since some debuffs are more severe/multifaceted than others.
As you might imagine, doing this 10x a second murdered about 30 percent of my frames. Thankfully, every 1 second is BARELY noticable if at all, but the display is nowhere near as good of course. Is there a faster and less taxing way to do this?
EDIT: fixed the custom script at the bottom. I was very tired when I wrote that
-
Status Colors 1st
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
Set AA_LEAK_UnitGroups = (Units in (Playable map area))
-
Unit Group - Pick every unit in AA_LEAK_UnitGroups and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is A structure) Equal to False
-
(Unit-type of (Picked unit)) Not equal to Random Hero (good guy colored)
-
(Unit-type of (Picked unit)) Not equal to Random Hero (BG)
-
-
Then - Actions
-
-------- -------------------- --------
-
-------- PRIORITY 1 --------
-
-------- -------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
((Picked unit) has buff Petrify ) Equal to True
-
((Picked unit) has buff Petrify (2)) Equal to True
-
-
-
-
Then - Actions
-
Animation - Change (Picked unit)'s vertex coloring to (10.00%, 10.00%, 10.00%) with 0.00% transparency
-
Skip remaining actions
-
-
Else - Actions
-
-
-------- -------------------- --------
-
-------- PRIORITY 2 --------
-
-------- -------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
((Picked unit) has buff Stunned) Equal to True
-
((Picked unit) has buff Stunned (Pause)) Equal to True
-
((Picked unit) has buff Thunder Clap) Equal to True
-
((Picked unit) has buff Entangling Roots ) Equal to True
-
((Picked unit) has buff Magic Entangle) Equal to True
-
((Picked unit) has buff Holy Fire ) Equal to True
-
-
-
-
Then - Actions
-
Animation - Change (Picked unit)'s vertex coloring to (72.00%, 25.00%, 72.00%) with 0.00% transparency
-
Skip remaining actions
-
-
Else - Actions
-
-
-------- -------------------- --------
-
-------- PRIORITY 3 --------
-
-------- -------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
((Picked unit) has buff Slow Poison (Non-stacking)) Equal to True
-
((Picked unit) has buff Slow Poison (Stacking)) Equal to True
-
((Picked unit) has buff Poison (Non-stacking)) Equal to True
-
((Picked unit) has buff Poison (Stacking)) Equal to True
-
-
-
-
Then - Actions
-
Animation - Change (Picked unit)'s vertex coloring to (15.00%, 100.00%, 15.00%) with 0.00% transparency
-
Skip remaining actions
-
-
Else - Actions
-
-
-------- -------------------- --------
-
-------- PRIORITY 4 --------
-
-------- -------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
((Picked unit) has buff Slowed) Equal to True
-
((Picked unit) has buff Slowed (Info) CUSTOM ) Equal to True
-
((Picked unit) has buff Slowed (Non-stacking) CUSTOM) Equal to True
-
((Picked unit) has buff Slowed (Stacking) CUSTOM) Equal to True
-
-
-
-
Then - Actions
-
Animation - Change (Picked unit)'s vertex coloring to (20.00%, 45.00%, 100.00%) with 0.00% transparency
-
Skip remaining actions
-
-
Else - Actions
-
-
-------- -------------------- --------
-
-------- PRIORITY 5 --------
-
-------- -------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
((Picked unit) has an item of type |cff8b00ffGaze of Romulus|r) Equal to True
-
((Picked unit) has an item of type |cff8b00ffGaze of Romulus|r |cff00ff00II|r) Equal to True
-
((Picked unit) has an item of type |cff8b00ffGaze of Romulus|r |cff00ff00III|r) Equal to True
-
-
-
-
Then - Actions
-
Animation - Change (Picked unit)'s vertex coloring to (25.00%, 100.00%, 25.00%) with 75.00% transparency
-
Skip remaining actions
-
-
Else - Actions
-
-
-------- -------------------- --------
-
-------- PRIORITY 6 --------
-
-------- -------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Picked unit) Equal to Ghost_Dragon
-
-
Then - Actions
-
Animation - Change Ghost_Dragon's vertex coloring to (100.00%, 100.00%, 100.00%) with 55.00% transparency
-
Skip remaining actions
-
-
Else - Actions
-
-
-------- -------------------- --------
-
-------- PRIORITY 7 --------
-
-------- -------------------- --------
-
-------- -fixes for tinted units- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Picked unit) Equal to Voldemort 0282 <gen>
-
-
Then - Actions
-
Animation - Change (Picked unit)'s vertex coloring to (40.00%, 40.00%, 40.00%) with 0.00% transparency
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Picked unit)) Equal to Huge Mamma Jamma
-
-
Then - Actions
-
Animation - Change (Picked unit)'s vertex coloring to (0.00%, 0.00%, 0.00%) with 0.00% transparency
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Picked unit)) Equal to Big Mamma Jamma
-
-
Then - Actions
-
Animation - Change (Picked unit)'s vertex coloring to (100.00%, 0.00%, 0.00%) with 0.00% transparency
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Picked unit)) Equal to Brood Mother
-
-
Then - Actions
-
Animation - Change (Picked unit)'s vertex coloring to (100.00%, 31.40%, 100.00%) with 0.00% transparency
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Picked unit)) Equal to Unbroken Darkweaver
-
-
Then - Actions
-
Animation - Change (Picked unit)'s vertex coloring to (100.00%, 39.22%, 39.22%) with 0.00% transparency
-
-
Else - Actions
-
Animation - Change (Picked unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
-
-
-
-
-
-
-
-
-
-
-
-
Else - Actions
-
-
-
-
Custom script: call DestroyGroup(udg_AA_LEAK_UnitGroups)
-
-
Last edited: