• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Need help using Bribe's DDS

Status
Not open for further replies.
Level 4
Joined
Nov 25, 2013
Messages
132
I was trying to make a spell that nulls all incoming damage to zero for a short period of time but i dont know how to make the unit recieve damage again. Need help badly. I removed and implemented the system again because i set the damage to zero the whole test run.
 
You'll need some way to make your "dmg-nulling condition" beeing timed and based of having either an buff/Ability/Varaible-State (unit indexer helps).

After the duration went off Remove this Ability/Variable again. On buffs unneeded but you only got a limited amount of buffs.

PS: Was Apothic shield not only blocking an specif amount of damage and then exploding?
 
Level 4
Joined
Nov 25, 2013
Messages
132
You'll need some way to make your "dmg-nulling condition" beeing timed and based of having either an buff/Ability/Varaible-State (unit indexer helps).

After the duration went off Remove this Ability/Variable again. On buffs unneeded but you only got a limited amount of buffs.

PS: Was Apothic shield not only blocking an specif amount of damage and then exploding?

EDIT: yes it does and im trying to make same spell but no boom at the end

PS: I know how to set the damage to zero but i dont know how to turn on the damage again. The missing key is to make the unit take damage again when the spell expire
 
You can create an empty constant Group at map init on cast add the target to the Group and loop multiple times a second trough the group reducing an duration value, if duration is expend remove the unit.

On Damagemodyfier check if the unit is inside the group, if inside block the damage.


Shows only a rough overview how it works. Normally you would de/activade the loop trigger to save cpu, for example.

Create Empty Group
  • Map iinit
    • Ereignisse
      • Map initialization
    • Bedingungen
    • Aktionen
      • -------- They do the same, first is more efficent but requiers typing --------
      • Custom script: set udg_Shield_Affected =CreateGroup()
      • Set Shield_Affected = (Units in (Playable map area) matching (False Gleich True))
Add Target to Shield and set duration
  • On Cast
    • Ereignisse
      • Unit - Casts a spell
    • Bedingungen
      • (Ability being cast) = Your Spell
    • Aktionen
      • Set Shield_Duration[(Custom value of (Target unit of ability being cast))] = 8.00
      • Einheitengruppe - Add (Target unit of ability being cast) to Shield_Affected
Block damage
  • On Damage
    • Ereignisse
      • Game - DamageModifierEvent becomes = 1.00
    • Bedingungen
    • Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventTarget is in Shield_Affected) = True
        • Then - Actions
          • Set DamageEventAmount = 0.00
          • Set DamageEventType = DamageTypeBlocked
        • Else - Actions
COunt down the duration kick Unit if needed
  • loop
    • Ereignisse
      • Zeit - Every 0.03 seconds of game time
    • Bedingungen
    • Aktionen
      • Einheitengruppe - Pick every unit in Shield_Affected and do (Actions)
        • Schleifen - Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Shield_Duration[(Custom value of (Picked unit))] > 0.00
            • Then - Actions
              • Set Shield_Duration[(Custom value of (Picked unit))] = (Shield_Duration[(Custom value of (Picked unit))] - 0.03)
            • Else - Actions
              • Einheitengruppe - Remove (Picked unit) from Shield_Affected
 
Last edited:
Level 4
Joined
Nov 25, 2013
Messages
132
You can create an empty constant Group at map init on cast add the target to the Group and loop multiple times a second trough the group reducing an duration value, if duration is expend remove the unit.

On Damagemodyfier check if the unit is inside the group, if inside block the damage.


Shows only a rough overview how it works. Normally you would de/activade the loop trigger to save cpu, for example.

Create Empty Group
  • Map iinit
    • Ereignisse
      • Map initialization
    • Bedingungen
    • Aktionen
      • -------- They do the same, first is more efficent but requiers typing --------
      • Custom script: set udg_Shield_Affected =CreateGroup()
      • Set Shield_Affected = (Units in (Playable map area) matching (False Gleich True))
Add Target to Shield and set duration
  • On Cast
    • Ereignisse
      • Unit - Casts a spell
    • Bedingungen
      • (Ability being cast) = Your Spell
    • Aktionen
      • Set Shield_Duration[(Custom value of (Target unit of ability being cast))] = 8.00
      • Einheitengruppe - Add (Target unit of ability being cast) to Shield_Affected
Block damage
  • On Damage
    • Ereignisse
      • Game - DamageModifierEvent becomes = 1.00
    • Bedingungen
    • Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventTarget is in Shield_Affected) = True
        • Then - Actions
          • Set DamageEventAmount = 0.00
          • Set DamageEventType = DamageTypeBlocked
        • Else - Actions
COunt down the duration kick Unit if needed
  • loop
    • Ereignisse
      • Zeit - Every 0.03 seconds of game time
    • Bedingungen
    • Aktionen
      • Einheitengruppe - Pick every unit in Shield_Affected and do (Actions)
        • Schleifen - Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Shield_Duration[(Custom value of (Picked unit))] > 0.00
            • Then - Actions
              • Set Shield_Duration[(Custom value of (Picked unit))] = (Shield_Duration[(Custom value of (Picked unit))] - 0.03)
            • Else - Actions
              • Einheitengruppe - Remove (Picked unit) from Shield_Affected

Thanks for the insight man.
 
Status
Not open for further replies.
Top