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

2 Rogue Spells - Easy

Status
Not open for further replies.
Level 12
Joined
Jan 13, 2008
Messages
559
Hey, I need 2 spells that work with multiple players.
1. The rogue can jump behind the target enemy (blink is fine..like..insta teleport), and stuns it for x seconds and deals x damage.

2. Rogue throws a knife at an enemy, causing a wound that bleeds him out..dealing x damage over x seconds. (Does a spell like this already exist? I couldnt find any)

thanks :)
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
I didn't add a pathing checker for the Blink Strike or a effect indicator for the DoT in Dagger Throw. I suggest you add those using any relevant system in the resource section. I also didn't know what you meant by "... depend on the damage of the hero casting the ability," so I just made it deal damage per second for now.

I made both of these quite in a rush, but as far as I know, they're leakless and MUI. Let me know if you run into any problems.



  • BS Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set BS_Ability = Blink Strike
      • Set BS_Dummy = Dummy Unit
      • Set BS_DummyAbility = Blink Strike (Stun + Damage)
      • Set BS_tempLoc = (Center of (Playable map area))
      • Unit - Create 1 BS_Dummy for Neutral Passive at BS_tempLoc facing Default building facing degrees
      • Set BS_dummyUnit = (Last created unit)
      • Unit - Add BS_DummyAbility to BS_dummyUnit
      • Unit - Remove BS_dummyUnit from the game
      • Custom script: call RemoveLocation(udg_BS_tempLoc)
  • BS Init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to BS_Ability
    • Actions
      • Set BS_caster = (Triggering unit)
      • Set BS_abilityLevel = (Level of BS_Ability for BS_caster)
      • Set BS_player = (Owner of BS_caster)
      • Set BS_target = (Target unit of ability being cast)
      • Set BS_targetLoc = (Position of BS_target)
      • Set BS_angle = ((Facing of BS_target) + 180.00)
      • Set BS_tempLoc = (BS_targetLoc offset by 100.00 towards BS_angle degrees)
      • Unit - Create 1 BS_Dummy for BS_player at BS_targetLoc facing Default building facing degrees
      • Set BS_dummyUnit = (Last created unit)
      • Unit - Add a 1.00 second Generic expiration timer to BS_dummyUnit
      • Unit - Add BS_DummyAbility to BS_dummyUnit
      • Unit - Set level of BS_DummyAbility for BS_dummyUnit to BS_abilityLevel
      • Unit - Order BS_dummyUnit to Human Mountain King - Storm Bolt BS_target
      • Unit - Move BS_caster instantly to BS_tempLoc, facing BS_targetLoc
      • Unit - Order BS_caster to Attack BS_target
      • Custom script: call RemoveLocation(udg_BS_tempLoc)
      • Custom script: call RemoveLocation(udg_BS_targetLoc)



  • DT Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set DT_Ability = Dagger Throw
      • Set DT_Dummy = Dummy Unit
      • Set DT_Damage[1] = 10.00
      • Set DT_Damage[2] = 12.00
      • Set DT_Damage[3] = 15.00
      • Set DT_Duration[1] = 3.00
      • Set DT_Duration[2] = 4.00
      • Set DT_Duration[3] = 6.00
      • Set DT_MissleSpeed = 35.00
      • Set DT_SFXMissle = Abilities\Weapons\WardenMissile\WardenMissile.mdl
      • Set DT_AttackType = Spells
      • Set DT_DamageType = Normal
      • Set DT_PeriodicTimer = 0.03
      • Trigger - Add to DT Loop <gen> the event (Time - Every DT_PeriodicTimer seconds of game time)
  • DT Init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to DT_Ability
    • Actions
      • Set DT_indexMax = (DT_indexMax + 1)
      • Set DT_caster[DT_indexMax] = (Triggering unit)
      • Set DT_abilityLevel[DT_indexMax] = (Level of DT_Ability for DT_caster[DT_indexMax])
      • Set DT_counterDuration[DT_indexMax] = 0.00
      • Set DT_missleHit[DT_indexMax] = False
      • Set DT_player[DT_indexMax] = (Owner of DT_caster[DT_indexMax])
      • Set DT_target[DT_indexMax] = (Target unit of ability being cast)
      • Set DT_targetLoc[DT_indexMax] = (Position of DT_target[DT_indexMax])
      • Set DT_tempDamage[DT_indexMax] = (DT_Damage[DT_abilityLevel[DT_indexMax]] x DT_PeriodicTimer)
      • Set DT_tempLoc = (Position of DT_caster[DT_indexMax])
      • Set DT_angle = (Angle from DT_tempLoc to DT_targetLoc[DT_indexMax])
      • Unit - Create 1 DT_Dummy for DT_player[DT_indexMax] at DT_tempLoc facing DT_angle degrees
      • Set DT_dummyUnit[DT_indexMax] = (Last created unit)
      • Special Effect - Create a special effect attached to the overhead of DT_dummyUnit[DT_indexMax] using DT_SFXMissle
      • Set DT_MissleSFX[DT_indexMax] = (Last created special effect)
      • Custom script: call RemoveLocation(udg_DT_tempLoc)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DT_indexMax Equal to 1
        • Then - Actions
          • Trigger - Turn on DT Loop <gen>
        • Else - Actions
  • DT Loop
    • Events
    • Conditions
    • Actions
      • For each (Integer DT_indexCurrent) from 1 to DT_indexMax, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DT_missleHit[DT_indexCurrent] Equal to False
            • Then - Actions
              • Set DT_tempLoc = (Position of DT_dummyUnit[DT_indexCurrent])
              • Set DT_aimLoc = (Position of DT_target[DT_indexCurrent])
              • Set DT_angle = (Angle from DT_tempLoc to DT_aimLoc)
              • Set DT_originLoc = (DT_tempLoc offset by DT_MissleSpeed towards DT_angle degrees)
              • Unit - Move DT_dummyUnit[DT_indexCurrent] instantly to DT_originLoc
              • Set DT_distance = (Distance between DT_originLoc and DT_aimLoc)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DT_distance Less than or equal to DT_MissleSpeed
                • Then - Actions
                  • Set DT_missleHit[DT_indexCurrent] = True
                • Else - Actions
            • Else - Actions
              • Custom script: call RemoveLocation(udg_DT_targetLoc[udg_DT_indexCurrent])
              • Special Effect - Destroy DT_MissleSFX[DT_indexCurrent]
              • Unit - Remove DT_dummyUnit[DT_indexCurrent] from the game
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (DT_target[DT_indexCurrent] is alive) Equal to True
                • Then - Actions
                  • Set DT_counterDuration[DT_indexCurrent] = (DT_counterDuration[DT_indexCurrent] + DT_PeriodicTimer)
                  • Unit - Cause DT_caster[DT_indexCurrent] to damage DT_target[DT_indexCurrent], dealing DT_tempDamage[DT_indexCurrent] damage of attack type Spells and damage type Normal
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • DT_counterDuration[DT_indexCurrent] Greater than or equal to DT_Duration[DT_abilityLevel[DT_indexCurrent]]
                      • (DT_target[DT_indexCurrent] is dead) Equal to True
                • Then - Actions
                  • Set DT_caster[DT_indexCurrent] = DT_caster[DT_indexMax]
                  • Set DT_abilityLevel[DT_indexCurrent] = DT_abilityLevel[DT_indexMax]
                  • Set DT_counterDuration[DT_indexCurrent] = DT_counterDuration[DT_indexMax]
                  • Set DT_missleHit[DT_indexCurrent] = DT_missleHit[DT_indexMax]
                  • Set DT_player[DT_indexCurrent] = DT_player[DT_indexMax]
                  • Set DT_target[DT_indexCurrent] = DT_target[DT_indexMax]
                  • Set DT_targetLoc[DT_indexCurrent] = DT_targetLoc[DT_indexMax]
                  • Set DT_tempDamage[DT_indexCurrent] = DT_tempDamage[DT_indexMax]
                  • Set DT_dummyUnit[DT_indexCurrent] = DT_dummyUnit[DT_indexMax]
                  • Set DT_MissleSFX[DT_indexCurrent] = DT_MissleSFX[DT_indexMax]
                  • Set DT_indexMax = (DT_indexMax - 1)
                  • Set DT_indexCurrent = (DT_indexCurrent - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • DT_indexMax Equal to 0
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
 

Attachments

  • Nordmar's Request.w3x
    28.8 KB · Views: 37
Level 37
Joined
Jul 22, 2015
Messages
3,485
because I don't wanna configure the damage before. It won't work if I want the unit to deal X % damage depending on the players custom_integer value.

I'm sorry I'm confused... I still don't see what's hard about that? Instead of doing Damage[] = flat integer, you can change flat integer to whatever you want including % of the caster's strength, max health, etc.
 
Level 12
Joined
Jan 13, 2008
Messages
559
yes to both of your questions. I think i can solve it..i just set the damage value not at map initialization but when the unit cast the ability. I would like the unit to have a buff while all the damaged happens and also i wanna spawn special effects of blood every 1 second its loosing damage. How should I approach this?
 
Last edited:
Level 37
Joined
Jul 22, 2015
Messages
3,485
I think i can solve it..i just set the damage value not at map initialization but when the unit cast the ability.

Lol thats what I told you to do.

If so, just index player number to a variable and replace the damage portion with playerDamage[playerNumber].


I would like the unit to have a buff while all the damaged happens and also i wanna spawn special effects of blood every 1 second its loosing damage. How should I approach this?

I told you about this as well, sir.

I didn't add a pathing checker for the Blink Strike or a effect indicator for the DoT in Dagger Throw. I suggest you add those using any relevant system in the resource section.
 
Status
Not open for further replies.
Top