• 🏆 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!

Permanent "Sentry Guardian Shield" on a unit when it spawns?

Status
Not open for further replies.
Level 11
Joined
Jul 25, 2005
Messages
573
I figured out how to make the shield last forever (Set the period count in the persistent effect of the ability to something ridiculous.) However the shield graphic only lasts about 30 seconds then it disappears regardless of if the ability is still working =/ have no clue how to make the graphic not do that.

Also do you have any clue if its possible to make the shield absorb damage and divert it to say, the actual shields of the unit? What I'm trying to do is make a mobile shield generator that would generate the Sentry's guardian shield around itself to protect allies, attacks would hit the shield and deal no damage to allies inside it as long as the shield holds.
 
Level 11
Joined
Jul 25, 2005
Messages
573
Try messing around with effects, even if you have to add a standard effect path onto all units for it.

Also remember that triggers do include a leakless any unit is damaged event. So you should be able to trigger this.

Heh thats what I've been doing for the past hour or so, I've got it to where it the shield will disappear when the unit's shields are depleted but I can't divert the damage from the units the shield is protecting to the unit generating the shield.




Another issue is that graphic issue in which the shield graphic disappears after about 30 seconds, I have no idea on how to get the shield graphic to permanetly show.

------------------

UPDATE

I was able to trigger it to where the shield absorbs the damage units take :D

Problem now is that because of the way the unit takes the damage the shield regeneration delay (40 seconds) does not trigger, so the shields are constantly regenerating, which causes the shields to never turn off.

Edit: Fixed the regen delay by triggering it so if the shield reaches 0 health that the shield regeneration is set to 0 for 30 seconds then returns to full health and regeneration.
 
Last edited:
Level 11
Joined
Aug 1, 2009
Messages
963
Make a damage effect that only deals 1 damage and apply it to the shield unit each time it is hit, then make the normal way you are making the shields take damage do 1 less than the actual damage. This way, the unit will take damage from a damage effect and not regen shields.

If that makes any sense, >.>
 
Level 11
Joined
Jul 25, 2005
Messages
573
Make a damage effect that only deals 1 damage and apply it to the shield unit each time it is hit, then make the normal way you are making the shields take damage do 1 less than the actual damage. This way, the unit will take damage from a damage effect and not regen shields.

If that makes any sense, >.>

lol don't get what you said, but I was able to trigger the shields to work perfect ^_^

  • Events
    • Unit - Any Unit takes Fatal or Non-Fatal Any damage (from Any effects)
    • Local Variables
      • Shielder = No Unit <Unit>
      • Nearby Shielders = (Empty unit group) <Unit Group>
    • Conditions
    • Actions
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • (Owner of (Attacking Unit)) != (Owner of (Triggering unit))
          • ((Triggering unit) has Sentry - Shield) == true
        • Then
          • Variable - Set Nearby Shielders = (Units in (Region((Position of (Triggering unit)), 6.0)) having alliance Ally with player (Owner of (Triggering unit)) matching Required: Has Shields; Excluded: Missile, Dead, Hidden, with at most Any Amount)
          • Unit Group - Pick each unit in Nearby Shielders and do (Actions)
            • Actions
              • General - If (Conditions) then do (Actions) else do (Actions)
                • If
                  • And
                    • Conditions
                      • Or
                        • Conditions
                          • (Unit type of (Picked unit)) == Psionic Force Generator
                          • (Unit type of (Picked unit)) == Shield Generator
                          • (Unit type of (Picked unit)) == Hand of Kerrigan
                      • ((Picked unit) Shields (Current)) > 0.0
                • Then
                • Else
                  • Unit Group - Remove (Picked unit) from Nearby Shielders
          • Variable - Set Shielder = (Closest unit to (Position of (Triggering unit)) in Nearby Shielders)
          • Unit - Set Shielder Shields to ((Shielder Shields (Current)) - (Triggering damage amount))
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • (Shielder Shields (Current)) <= 50.0
            • Then
              • Unit - Set Shielder Shields Regeneration Rate to 0.0
              • General - Wait 30.0 Game Time seconds
              • General - If (Conditions) then do (Actions) else do (Actions)
                • If
                  • (Unit type of (Picked unit)) == Hand of Kerrigan
                • Then
                  • Unit - Set Shielder Shields Regeneration Rate to 80.0
                • Else
                  • Unit - Set Shielder Shields Regeneration Rate to 50.0
              • Unit - Set Shielder Shields (Percent) to 100.0
            • Else
          • Variable - Set Shielder = No Unit
        • Else
 
Status
Not open for further replies.
Top