- Joined
- Jan 30, 2020
- Messages
- 776
So, I have destructables that have these models Concrete Cliff
In some cases, I'd like to add the "alternate"-tag (if they would've been units), but I cannot find a good way of doing that...
Is there a known way of adding animation-tags to destructables?
Or do I need a bigger "if-tree" to manually play various animations depending on if it's dead or alive, possibly even handle the birth/death animations?
Maybe use string-array to keep track of current animation to enable tracking of birth/death animations.
Note. Birth/Deahs are controlled by centralized triggers, so I can easily ensure that this animation-array is tracked...
Currently I do not handle "dead" destructables, making their visuals not match what it should.
All walls and doors have exactly 200 occlusion height, so I can do this.
In some cases, I'd like to add the "alternate"-tag (if they would've been units), but I cannot find a good way of doing that...
Is there a known way of adding animation-tags to destructables?
Or do I need a bigger "if-tree" to manually play various animations depending on if it's dead or alive, possibly even handle the birth/death animations?
Maybe use string-array to keep track of current animation to enable tracking of birth/death animations.
Note. Birth/Deahs are controlled by centralized triggers, so I can easily ensure that this animation-array is tracked...
Currently I do not handle "dead" destructables, making their visuals not match what it should.
All walls and doors have exactly 200 occlusion height, so I can do this.
-
UpdateNearbyDestructiblesTick
-
Events
-
Time - Every 0.20 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in heroes_alive and do (Actions)
-
Loop - Actions
-
Set t_loc1 = (Position of (Picked unit))
-
Destructible - Pick every destructible within 550.00 of t_loc1 and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Occlusion height of (Picked destructible)) Equal to 200.00
-
-
Then - Actions
-
Set t_loc2 = (Position of (Picked destructible))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Distance between t_loc1 and t_loc2) Less than 375.00
-
(Y of t_loc2) Less than (Y of t_loc1)
-
-
Then - Actions
-
Animation - Play (Picked destructible)'s stand alternate animation
-
-
Else - Actions
-
Animation - Play (Picked destructible)'s stand animation
-
-
-
Custom script: call RemoveLocation(udg_t_loc2)
-
-
Else - Actions
-
-
-
-
Custom script: call RemoveLocation(udg_t_loc1)
-
-
-
-
Destructible - Pick every destructible within
seems leaks rects... I'll need to change way of picking destructables I guess...