Temporary Cleave

Zetrix91

TH.net Regular
Reaction score
2
Trying to create an active cleave ability, is there any active cleave ability, another solution is hiding the passive cleave icon. any solutions coming to mind?

GUI very prefered.

ty in advance

EDIT: its supposed to work on multiple player at the same time - not important
 

Tyman2007

Ya Rly >.
Reaction score
74
its supposed to work on multiple player at the same time - not important

no, it is VERY important if you want a good working map.

There's an ability that gives a unit splash damage called Cleaving Attack under neutral hostile in the abilities section.
 

Ayanami

칼리
Reaction score
288
Well, here's the solution. Base your active ability on anything that you want. Make an ability based on Cleave, which will be your dummy ability. Create another ability based on "Item - Spell Book". Ensure that it is a unit ability. Now, add the Cleave ability in the Spell Book. Then, at map initialization, do this.

Trigger:
  • Map Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set CleaveAbility <-- Set your Spell Book to this variable
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Disable CleaveAbility for (Picked player)


By doing this, it hides the Spell Book icon, but all the passive abilities inside the Spell Book still takes effect. Here's the trigger to make it temporarily active.

Trigger:
  • Ability
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to MyAbility
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Custom script: call UnitAddAbility(u, udg_CleaveAbility)
      • Wait for 5.00 seconds <-- Your duration
      • Custom script: call UnitRemoveAbility(u, udg_CleaveAbility)
      • Custom script: set u = null
 

Tyman2007

Ya Rly >.
Reaction score
74
Trigger:
  • Ability
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to MyAbility
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Custom script: call UnitAddAbility(u, udg_CleaveAbility)
      • Wait for 5.00 seconds <-- Your duration
      • Custom script: call UnitRemoveAbility(u, udg_CleaveAbility)
      • Custom script: set u = null

EWWWWW

Gleeennnnn just use jass and paste the code.
 

Zetrix91

TH.net Regular
Reaction score
2
Well, here's the solution. Base your active ability on anything that you want. Make an ability based on Cleave, which will be your dummy ability. Create another ability based on "Item - Spell Book". Ensure that it is a unit ability. Now, add the Cleave ability in the Spell Book. Then, at map initialization, do this.

Trigger:
  • Map Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set CleaveAbility <-- Set your Spell Book to this variable
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Disable CleaveAbility for (Picked player)


By doing this, it hides the Spell Book icon, but all the passive abilities inside the Spell Book still takes effect. Here's the trigger to make it temporarily active.

Trigger:
  • Ability
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to MyAbility
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Custom script: call UnitAddAbility(u, udg_CleaveAbility)
      • Wait for 5.00 seconds <-- Your duration
      • Custom script: call UnitRemoveAbility(u, udg_CleaveAbility)
      • Custom script: set u = null

okay, so if i just copy paste that and change the variables and stuff, will this be mui? ive heard the "wait" function is not mui, that it sets the function on hold for the duration

also, will this be multi player functional?
 

Zetrix91

TH.net Regular
Reaction score
2
got it multiplayer functional by myself, worked great! thank you!

Thanks for the very helpful pointers and suggestions
 
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