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

need help making some spells

Status
Not open for further replies.
Level 2
Joined
Nov 5, 2014
Messages
23
Need help making some spells with in GUI the following description

1. Increasing attackspeed (or a certain stats) based on on health missing.

2. A buff or passive skill that increases (X stats) based on number of enemy unit within X radius of the caster.

3. Deals damage on an area based on how many unit are within that area .

4. A passive spell that deals bonus damage (for example) after doing 5/4/3 attacks.

Thanks in advance.
 

Ardenian

A

Ardenian

1. It is impossible to give accurate attack speed based on exact health missing, or more exactly, it would be inefficient as hell, since you would need one ability level for every %, resulting in 100 abilities or 100 ability levels. You can use one for every 10 levels though.

Use the Unholy Frenzy ability as base, set the damage value to 0. I assume it is for a hero ? Create a dummy caster and modify to make it instant casting ( look on other GUI spells for reference ( I would recommend my Orbs system, it has a dummy like the one you need)).
Now, you can either have a periodic loop to check how much health a unit has or you can add events once health reaches under a certain percentage and order the dummy to cast frenzy on the hero.

2. There is no such default ability. Create a dummy ability ( an ability doing/changing nothing, to have an ability icon for the caster) and in a periodic loop check for units surrounding the caster ( caster ? I though it is a passive). Use 0.03 seconds loop for optimal time interval.
If you would like to have a buff, use the same procedure as in 1., but remove attack speed and damage

3. Set a certain point ( considering facing angle of the casting unit) and pick every unit in X range around it and damage them.

4. Create a counter and every time the unit attacks ( you need a DDS for this, I recommend the PDD by looking_for_help and add the condition that the damage dealt is physical), increase it by 1.
Once it reaches a certain number of attacks, use an IF/Then/Else to add an action dealing damage to the target

Feel free to ask if you need more details
 
Level 13
Joined
Jul 15, 2007
Messages
763
If 1 is passive, then this is easy enough to do, just check every 1 second and change the level of hidden stat abilities to an appropriate level (e.g. If you want 10% IAS for every 5% HP missing, then you find the missing HP of the target, and divide it by 5).

If it is active, then you can easily enough use hashtables to adjust the level of your stat abilities when you check them periodically for the spell's duration.

2. This one is tricky as it will involve checking the area around the caster every few seconds to adjust the level of your stat abilities. Make sure it is leakless.

3. What Ardenian said. Use conditions to filter out units you don't want counted (e.g. dead, allied)

4. What Ardenian said, though you could try using an orb auto-cast like Searing Arrows to also count (if you're against DDS systems).
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
1. Use Base 2 rule.
1 Level of +1% AS
1 Level of +2% AS
1 Level of +4% AS
...
1 Level of +64% AS

Let's say you need a +43%, all you have to do is:
43 - 32 = 11
11 - 8 = 3
3 - 2 = 1
1 - 1 = 0

So you would need to give these abilities to that unit:
+32%
+8%
+2%
+1%

You only need 7 Ability to cater this if you are using 1% missing health gains 1% AS.
 
Level 2
Joined
Nov 5, 2014
Messages
23
thnx for replying everyone

1. i simply dont get what everyone is saying here especially "base 2 rule"?

2. here's what i did...BTW im using a custom stat system i found here in THW.
  • Test Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Trigger - Add to Main <gen> the event (Unit - A unit comes within 256.00 of (Test_Unit)) << i dunno where or how to declare this variable. its supposed to be our main unit "Triggering Unit"
          • Unit Group - Add (Picked unit) to Test_Group2
      • Custom script: call DestroyGroup(udg_Temp_Group)[/hidden]


  • Test Add Unit
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Entering unit) is in Test_Group2) Equal to False
    • Actions
      • Trigger - Add to Main <gen> the event (Unit - A unit comes within 256.00 of (Test_Unit))
      • Unit Group - Add (Entering unit) to Test_Detect[/hidden]

  • Main
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Hightened Alertness (Elite Assasin) for (Test_Unit)) Greater than 0
          • ((Entering unit) belongs to an ally of (Owner of (Test_Unit))) Equal to False
        • Then - Actions
          • -------- if loop trigger is not used we turn it on --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Test_Switch Equal to 0
            • Then - Actions
              • Trigger - Turn on Test Loop <gen>
            • Else - Actions
          • -------- increasing index --------
          • Set Test_CastNumber = (Test_CastNumber + 1)
          • -------- confirms that ability used by one more unit --------
          • Set Test_Switch = (Test_Switch + 1)
          • Set Test_Off[Test_CastNumber] = True
          • -------- establish user --------
          • Set Test_Unit[Test_CastNumber] = (Triggering Unit) <<< this is supposed to be our main unit but i dunno what he's supposed to be now
          • -------- increasing Stat --------
          • Custom script: call CSS_AddBonus (udg_Test_Unit[udg_Test_CastNumber], 1 , 1) <<<<Custom stat system i found here in THW
        • Else - Actions
  • [/hidden]

  • Test Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Test_Integer) from 1 to Test_CastNumber, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Test_Off[Test_Integer] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • - This is the part im stuck...how to detect if the unit has left the user's range via death or simply just walking away -
                • Then - Actions
                  • --------i dunno how to confirm that a unit left the main user's range --------
                  • -------- subtract the stats from the user --------
                  • Custom script: call CSS_AddBonus (udg_Test_Unit[udg_Test_Integer], -1 , 1)
                  • -------- subtract 1 from switch, means one unit less used this trigger --------
                  • Set Test_Switch = (Test_Switch - 1)
                  • -------- if trigger is not used by other units, we reset index and turn trigger off --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Test_Switch Equal to 0
                    • Then - Actions
                      • Set Test_CastNumber = 0
                      • Trigger - Turn off Test Loop <gen>
                    • Else - Actions
                • Else - Actions
            • Else - Actions
  • [/hidden]
problems are written within

3. i think i need to clarify some stuff here....i need to know how to make a spell (based on silence i think) that deals bonus damage based on how many enemy unit are within the AOE at that moment ... basically like this 25 x number of units present within the AOE (ex. 25 x 10 unit = 250 damage to each unit)

4. how bout this?

  • Attack
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has buff Test_Attack ) Equal to True
    • Actions
      • Set AInteger = (AInteger + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AInteger Equal to 5
        • Then - Actions
          • Set AInteger = 0
          • -------- Do awesome stuff here--------
        • Else - Actions
  • [/hidden]
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
3. i think i need to clarify some stuff here....i need to know how to make a spell (based on silence i think) that deals bonus damage based on how many enemy unit are within the AOE at that moment ... basically like this 25 x number of units present within the AOE (ex. 25 x 10 unit = 250 damage to each unit)

Now I don't know how you want the ability, whether passive or active.
But I will solve it using 'Active' way :

1- Active : Well this is very simple, You'd need an ability with no target (Such as Thunder Clap) , and trigger it as when it is executed, the damage wanted is dealt , just like this :

Active AOE Damaging
  • Events
    • Unit - Generic Unit Event - A Unit starts the effect of an ability
  • Conditions
    • (Ability Being Cast) Equal to "Your Ability" == based on Thunder Clap forexample ==
  • Actions
    • Set Ability_Caster = (Triggering Unit)
    • Set Ability_CasterPoint = (Position of (Ability_Caster))
    • Set Ability_AOEUnits = (Units within range of 250 from point "Ability_CasterPoint" Matching conditions : "(Matching Unit) Not Equal to 'Ability_Caster'"
    • Set Ability_Damage = (Arithmetic : (Number of Units in Ability_AOEUnits) x 25.00
    • Unit Group - Pick Every Unit in Ability_AOEUnits and do the action :
      • Loop - Actions
        • Unit - Cause Ability_Caster to damage (Picked Unit) with damage dealt 'Ability_Damage' of type "your type"....
    • Custom script: call RemoveLocation(udg_Ability_CasterPoint)
    • Custom script: call DestroyGroup(Ability_AOEUnits)
Since the trigger above is instant, then it's MUI and MPI. (afaik), and you can also add instant special effects too :D

Now if you want it 'PASSIVE', I can post the triggers here, yet I don't think you want it 'passive'.

4- That's right, I think that'd work.

Good luck.
 
Level 2
Joined
Nov 5, 2014
Messages
23
Now I don't know how you want the ability, whether passive or active.
But I will solve it using 'Active' way :

1- Active : Well this is very simple, You'd need an ability with no target (Such as Thunder Clap) , and trigger it as when it is executed, the damage wanted is dealt , just like this :

Active AOE Damaging
  • Events
    • Unit - Generic Unit Event - A Unit starts the effect of an ability
  • Conditions
    • (Ability Being Cast) Equal to "Your Ability" == based on Thunder Clap forexample ==
  • Actions
    • Set Ability_Caster = (Triggering Unit)
    • Set Ability_CasterPoint = (Position of (Ability_Caster))
    • Set Ability_AOEUnits = (Units within range of 250 from point "Ability_CasterPoint" Matching conditions : "(Matching Unit) Not Equal to 'Ability_Caster'"
    • Set Ability_Damage = (Arithmetic : (Number of Units in Ability_AOEUnits) x 25.00
    • Unit Group - Pick Every Unit in Ability_AOEUnits and do the action :
      • Loop - Actions
        • Unit - Cause Ability_Caster to damage (Picked Unit) with damage dealt 'Ability_Damage' of type "your type"....
    • Custom script: call RemoveLocation(udg_Ability_CasterPoint)
    • Custom script: call DestroyGroup(Ability_AOEUnits)
Since the trigger above is instant, then it's MUI and MPI. (afaik), and you can also add instant special effects too :D
Good luck.

Can i do this if my base spell is blizzard?
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
Can i do this if my base spell is blizzard?

Well Blizzard isn't an instant spell, it is channeled upon a small period of time. As far as I remember, it targets the area chosen. Well , that will totally change the trigger. I thought you wanted an instant spell right? If you want an instant spell with Area-Target type, I suggest using Blood mage's spell ( Flame thingy ) , (easy to edit it to make it instant).

But after all, using 'Channel' spell as a base-ability is the best.
 
Level 2
Joined
Nov 5, 2014
Messages
23
Well Blizzard isn't an instant spell, it is channeled upon a small period of time. As far as I remember, it targets the area chosen. Well , that will totally change the trigger. I thought you wanted an instant spell right? If you want an instant spell with Area-Target type, I suggest using Blood mage's spell ( Flame thingy ) , (easy to edit it to make it instant).

But after all, using 'Channel' spell as a base-ability is the best.

i was planning on basing it on silence to ensure the "instant" part
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
i was planning on basing it on silence to ensure the "instant" part

Well since I don't remember how Silence works, whether it's Point-Target (which is instant) or Target-less (which is instant too), either way, the trigger above will work, you'll just have to base it on my trigger.

If you want to hurt just "one" unit according to how many units there are in an area, then change this :
To Change
  • Unit Group - Pick Every Unit in Ability_AOEUnits and do the action :
    • Loop - Actions
    • Unit - Cause Ability_Caster to damage (Picked Unit) with damage dealt 'Ability_Damage' of type "your type"....
With this !! :

Changed
  • Unit - Cause Ability_Caster to damage (Event Response - Ability Target) with damage dealt 'Ability_Damage' of type "your type"....
 
Level 2
Joined
Nov 5, 2014
Messages
23
Here's what i did no. 2...BTW im using a custom stat system i found here in THW.
  • Test Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Trigger - Add to Main <gen> the event (Unit - A unit comes within 256.00 of (Test_Unit)) << i dunno where or how to declare this variable. its supposed to be our main unit "Triggering Unit"
          • Unit Group - Add (Picked unit) to Test_Group2
      • Custom script: call DestroyGroup(udg_Temp_Group)[/hidden]


  • Test Add Unit
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Entering unit) is in Test_Group2) Equal to False
    • Actions
      • Trigger - Add to Main <gen> the event (Unit - A unit comes within 256.00 of (Test_Unit))
      • Unit Group - Add (Entering unit) to Test_Detect[/hidden]

  • Main
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Hightened Alertness (Elite Assasin) for (Test_Unit)) Greater than 0
          • ((Entering unit) belongs to an ally of (Owner of (Test_Unit))) Equal to False
        • Then - Actions
          • -------- if loop trigger is not used we turn it on --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Test_Switch Equal to 0
            • Then - Actions
              • Trigger - Turn on Test Loop <gen>
            • Else - Actions
          • -------- increasing index --------
          • Set Test_CastNumber = (Test_CastNumber + 1)
          • -------- confirms that ability used by one more unit --------
          • Set Test_Switch = (Test_Switch + 1)
          • Set Test_Off[Test_CastNumber] = True
          • -------- establish user --------
          • Set Test_Unit[Test_CastNumber] = (Triggering Unit) <<< this is supposed to be our main unit but i dunno what he's supposed to be now
          • -------- increasing Stat --------
          • Custom script: call CSS_AddBonus (udg_Test_Unit[udg_Test_CastNumber], 1 , 1) <<<<Custom stat system i found here in THW
        • Else - Actions
  • [/hidden]

  • Test Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Test_Integer) from 1 to Test_CastNumber, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Test_Off[Test_Integer] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • - This is the part im stuck...how to detect if the unit has left the user's range via death or simply just walking away -
                • Then - Actions
                  • --------i dunno how to confirm that a unit left the main user's range --------
                  • -------- subtract the stats from the user --------
                  • Custom script: call CSS_AddBonus (udg_Test_Unit[udg_Test_Integer], -1 , 1)
                  • -------- subtract 1 from switch, means one unit less used this trigger --------
                  • Set Test_Switch = (Test_Switch - 1)
                  • -------- if trigger is not used by other units, we reset index and turn trigger off --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Test_Switch Equal to 0
                    • Then - Actions
                      • Set Test_CastNumber = 0
                      • Trigger - Turn off Test Loop <gen>
                    • Else - Actions
                • Else - Actions
            • Else - Actions
  • [/hidden]
problems are written within
 
Status
Not open for further replies.
Top