Any way to make this Possible?

Draganizer

Member
Reaction score
1
I was wondering if you could make a spell deal X damage and that X damage would be the amount of clicks to that key in a certain amount of time. Such as the spacebar / hotkey/ or arrow key. If this is possible please let me know.
 

Shura

New Member
Reaction score
45
As long as the key press can be detected, you would need to make a trigger that would add one to a variable each time the key is pressed, for the duration you have to press the key. The triggers would be relatively easy to make, but if you need this to work for multiple units at the same time, it would be a little more difficult.
 

Draganizer

Member
Reaction score
1
well lets say its all different spell triggers would it be fine if theyre all spamming the same key? for example a unit uses fire would need to spam space then another unit uses ice and needs to spam space. would they itneract the variables if i use seperate triggers?
 

Shura

New Member
Reaction score
45
They would, but you can use custom values to make sure they wouldn't conflict.
 

Shura

New Member
Reaction score
45
Trigger:
  • trigger 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your Ability
    • Actions
      • Unit - Set the custom value of (Triggering unit) to 0
      • Set DamageTarget[(Player number of (Owner of (Triggering unit)))] = (Target unit of ability being cast)
      • Unit Group - Add (Triggering unit) to UnitGroup
      • Wait X seconds
      • Unit - Cause (Triggering unit) to damage DamageTarget[(Player number of (Owner of (Triggering unit)))], dealing (Real((Custom value of (Triggering unit)))) damage of attack type Spells and damage type Normal
      • Unit Group - Remove (Triggering unit) from UnitGroup

Trigger:
  • trigger 2
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
      • Add this event for every player
    • Conditions
    • Actions
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Picked unit)) Equal to (Triggering player)
            • Then - Actions
              • Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + 1)
            • Else - Actions

With this, when the ability is cast, the player would have X seconds to press the ESC button as many times as possible. When X seconds pasts, damage will be dealt to the target unit dealing damage equal to the number of times pressed. This will only work as long as each player only has one unit that can use this ability.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top