How to make a shield effect (Guardian Shield) around a structure? I've tried to attach in events but didn't work. Shield should disappear when the structure's shields run out.
The Model type actor determines the visual for the shield. Just create your model when your effect/buff for the shield is activated and destroy it when it has finished playing the death animation after the removal conditions are met.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
After some investigating on how sentries use the guardian shield I ended up taking the following steps:
The Shield Generator behavior periodically runs a Create Set with a validator for "has shields". This set runs the Search Effect (for my shield generator's functionality) and an Apply Behavior. The applied behavior is called Shield Generator On. In the Shield Generator On Actor (copied from Guardian Shield) the actor is created when the behavior turns on and the animation stops when the behavior turns off. This works in creating a shield effect and removing it when the shield is destroyed.
However, there are two major problems:
1. The shield expires after 31 seconds (I assume it's because the animation only lasts for this long, any way to extend it or to refresh it? I'm bad with data editor)
Even with Play Forever flag, the animation still stops after 35 seconds. Any way to slow it down so it would last let's say a few hours to make sure there would be no problems?
I checked closely and buff does have periodic lapses in duration as shown:
1. Shield Generator Created, buff is present
2. Shield Generator Shot, no shields left and buff gone
So even when the behaviour is removed from the unit for some time the marine model actor still persists?
This means you need to go to the Cutscenes editor and look more closely at the animations of your shield model. Some models have a dead section to their animations near the end so need timers to manually reset their animation to the beginning.
What is the difference between the ShieldGenerator and ShieldGeneratorOn behaviours? You seem to be using one for the creation of your shield and the other for the destruction sequence.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
No, when the behavior is removed the model actor is removed.
My point was that, unlike the shield actor, it doesn't just stop after 35 seconds even when it should be there.
ShieldGenerator is the always running behavior which periodically runs a few effects for the shield generator, one of those effects creates ShieldGeneratorOn. Only ShieldGeneratorOn should be linked to the actor and that's fixed now. As a result, the shield now comes back after being attacked.
My only remaining problem is that the shield actor doesn't remain for more than 35 seconds. Looking at the shield generator in the cutscene editor, I saw the animation was 5 seconds long although I don't really know how the cutscene editor works.
How to make a shield effect (Guardian Shield) around a structure? I've tried to attach in events but didn't work. Shield should disappear when the structure's shields run out.
The Model type actor determines the visual for the shield. Just create your model when your effect/buff for the shield is activated and destroy it when it has finished playing the death animation after the removal conditions are met.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
After some investigating on how sentries use the guardian shield I ended up taking the following steps:
The Shield Generator behavior periodically runs a Create Set with a validator for "has shields". This set runs the Search Effect (for my shield generator's functionality) and an Apply Behavior. The applied behavior is called Shield Generator On. In the Shield Generator On Actor (copied from Guardian Shield) the actor is created when the behavior turns on and the animation stops when the behavior turns off. This works in creating a shield effect and removing it when the shield is destroyed.
Under the Animation Bracket Start event action try the Play Forever flag?
By the shield not coming back on it is clear that your buff is not having periodic lapses in duration so that can be removed as a possible cause.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
In reply to DrSuperEvil:
Ok make sure the duration of the buff is slightly longer than the period being used to apply it (0.1secs overlap is enough).
Maybe the lapse in buff coverage is too short for the death animation to have finished so it is not creating a new one.
Do a test where the unit has the buff on permanently.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
In reply to DrSuperEvil:
temporarily swap the shield model with a marine and see if that shows the same problems.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
In reply to DrSuperEvil:
So even when the behaviour is removed from the unit for some time the marine model actor still persists?
This means you need to go to the Cutscenes editor and look more closely at the animations of your shield model. Some models have a dead section to their animations near the end so need timers to manually reset their animation to the beginning.
What is the difference between the ShieldGenerator and ShieldGeneratorOn behaviours? You seem to be using one for the creation of your shield and the other for the destruction sequence.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
In reply to DrSuperEvil:
In the cutscene editor right click the blue bar near the bottom and select Change Animation to see all the animations the model has.
Instead of applying an animation bracket, maybe just use a Play Animation action?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
That fixed it, although it's now a static circle rather than more of a shield, I'm just glad I got somewhere with this.