Healt % Based Spell and Kill Stacks.

Yauld

New Member
Reaction score
0
I want to make some sort of Kill Shot / Hammer of Wrath spell. It should kill the target if it has under a certain % of hp (Let's say 15%).

And another spell that i want help with; When you kill a unit you get a stack, and when you have a stack you can use a specific ability. For example; ''Deals 250 damage. Can only be used if you've killed a unit in the last 30 seconds.'' The stack may also be able to stack up if that is possible.

Thank you in advance.
 

maxou

You can change this now in User CP.
Reaction score
15
@The first spell :
Event-
An unit Initiate an ability
Conditions-
Ability being cast Equal to Kill Shot
Percentage health of (Target unit ability being cast) is Inferior at 15%
Actions-
Cause (Casting unit) to deal (Target unit of ability being cast) dealing 99999 ... blablabla.
=> cause to deal damage cause else you won't get a credit for the kill, so no exp, no gold, I don't know the map where you want to use it.

Edit: next will come tomorrow
 

maxou

You can change this now in User CP.
Reaction score
15
What would be the point in stacking up the stack you get by killing an unit?
Anyway, the spell can be used by multiple unit owned by the same player ? or used only by 1 unit per player?
 

Yauld

New Member
Reaction score
0
It will be some sort of Moba/DotA game so only one unit per player. For every stack you get you're able to cast the spell that needs a stack again.

Thanks for the help!
 

A-SM

New Member
Reaction score
1
Here's for the Kill Shot:
Trigger:
  • KillShot
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Kill_Shot
      • (Percentage life of (Target unit of ability being cast)) Less than or equal to 15.00
    • Actions
      • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 999999.00 damage of attack type Chaos and damage type Unknown


And for the Stack Spell, you need 2 abilities. Let say the the ability is the Kill Shot itself, make 2 of the Kill Shot. One for the real Kill Shot and the another one for the Disabled Kill Shot. Give your hero only the Disabled KillShot to begin with. And there will be 3 triggers for this (maybe):

//First trigger, to check/add the stack everytime your hero kills a unit (assuming the unit is a hero)
Trigger:
  • Check_KillShot_Stack
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
      • (Killing unit) Equal to Your_Hero
    • Actions
      • Set KillShot_Stack = (KillShot_Stack + 1.00)


//Second trigger, to add the real Kill Shot to your Hero
Trigger:
  • KillShot_On
    • Events
      • Game - KillShot_Stack becomes Greater than or equal to 1.00
    • Conditions
    • Actions
      • Unit - Add Enabled_KillShot to Your_Hero
      • Unit - Remove Disabled_KillShot from Your_Hero


//Third trigger, which to check the number your hero use the real Kill Shot. And remove it if it use the skill as the number of the stack it gets.
Trigger:
  • KillShot_Counter
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Enabled_KillShot
    • Actions
      • Set KillShot_Stack = (KillShot_Stack - 1.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KillShot_Stack Less than or equal to 0.00
        • Then - Actions
          • Unit - Remove Enabled_KillShot from Your_Hero
          • Unit - Add Disabled_KillShot to Your_Hero
        • Else - Actions
          • Do nothing


Well, that's my opinion. I'm also new to World Editor, but that's something came up to my mind when I think about your skill. Maybe there's a better trigger. But you can try this trigger. :)
 

Juno**

Member
Reaction score
6
  • KillShot
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Kill_Shot
      • (Percentage life of (Target unit of ability being cast)) Less than or equal to 15.00
    • Actions
      • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 999999.00 damage of attack type Chaos and damage type Unknown
      isn't it much more simpler if you use this action? vvvvvvvv
      • Unit - Kill (Target of ability being cast)
 

chukky-jr

Member
Reaction score
15
^just reminding there is no way to detect who is the killer if you do that, well we can but then the 'Unit - cause damage event' would be shorter
 

vypur85

Hibernate
Reaction score
803
For the second spell, just create a buffing ability with several levels, say 10, and the buff lasts for 30 seconds. Then, when your unit kills a unit, create a dummy unit and order it to cast the buffing ability to your killing unit. You'll need to check if the unit already have the buff or not. If the unit already has the buff, then increase the level of the ability accordingly and then cast.

For the stacking part, just check if the has unit has this buff, then deal additional damage.

Note: You'll need 10 separate buffs to be able to detect the level of the ability. Eg. Level 1 will have buff 1, level 2 will have buff 2 and so on.

No trigger to display this time around, sorry. :)
 

maxou

You can change this now in User CP.
Reaction score
15
It will be some sort of Moba/DotA game so only one unit per player. For every stack you get you're able to cast the spell that needs a stack again.

Thanks for the help!


Then do something like that, simple MPI system; create a dummy called 'Have 1 stack' (model : .mdl, no attacks, capacities : infest, invulnerability and remove shadows) and create a region where you'll create them, they have no utility, and basically, you can't see them no matter where they are.

Trigger:
  • Have killed an unit
    • Events
      • Unit - An unit dies
    • Conditions
    • Actions
      • Set Stack[Player number of (Owner of Killing unit)] = Stack[Player number of (Owner of Killing unit)] + 30


Trigger:
  • Check every second if able to cast ability
    • Events
      • Time - Every 1.00 second of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12
      • Unit - Remove Stack_unit[Integer A] from the game
      • Set Stack_unit[Integer A] = Last created unit
      • If (All conditions are true) then (do actions) else (do actions)
        • If - Conditions
          • Stack[Integer A] is different of 0
        • Then - Actions
          • Unit - Create 1 unit of type DUMMY_CREATED_PREVIOUSLY for Player(Integer A) at Center of REGION_CREATED_PREVIOUSLY facing Default orientation.
          • Set Stack[Integer A] = Stack[Integer A] - 1
        • Else - Actions


Trigger:
  • Unit uses a stack
    • Events
      • Unit - An unit cast an ability
    • Conditions
      • (Ability being cast) Equal to YOUR_ABILITY
    • Actions
      • Set Stack[Player number of (Owner of Casting unit)] = Stack[Player number of (Owner of Casting unit)] - 30
      • If (All conditions are true) then (do actions) else (do actions)
        • If - Conditions
          • Stack[Integer A] is inferior to 0
        • Then - Actions
          • Set Stack[Player number of (Owner of Casting unit)] = 0
        • Else - Actions


and then add in the condition line of your spell the DUMMY_CREATED_PREVIOUSLY. This might works.

Variable : Stack[], integer array (size : 12)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top