• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Trying to make a spell

Status
Not open for further replies.
Level 6
Joined
Sep 27, 2008
Messages
258
I am trying to make a spell for the spell i want it to be a chance on death to blow up and do dmg in an aoe but idk how i would go about soing that can someone help me.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Here are the basics



  • Untitled Trigger 005
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Light
      • ((Target unit of ability being cast) is in Explode_Group) Equal to False
    • Actions
      • Unit Group - Add (Target unit of ability being cast) to Explode_Group
  • Untitled Trigger 006
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is in Explode_Group) Equal to True
    • Actions
      • Set u1 = (Triggering unit)
      • Set l1 = (Position of u1)
      • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Weapons\DemolisherFireMissile\DemolisherFireMissile.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 300.00 of l1) and do (Actions)
        • Loop - Actions
          • Set u2 = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (u2 is alive) Equal to True
            • Then - Actions
              • Unit - Cause u1 to damage u2, dealing 100.00 damage of attack type Spells and damage type Normal
            • Else - Actions
      • Custom script: call RemoveLocation(udg_l1)



The exploding unit damages all units within 300 radius for 100 damage. You can add filters for that.

u1 = unit variable
u2 = unit variable
l1 = point variale
Explode_Group = unit group variable
 
Level 6
Joined
Sep 27, 2008
Messages
258
is it chance on death of the hero/unit with the spell?
or
chance on death of the hero/unit is killing?
the death of the hero with the spell

{Maker}

k how would i trigger it so it had lets say 6 lvls


and another type of spell i am trying to make is on death for ever unit with in a area of the dead hero there is a chance to turn them into a zombie
 
Level 17
Joined
Jan 21, 2007
Messages
2,013
Are your spell leveling up with constant numbers(Level 1 - 50 damage, Level 2 - 100 damage, Level 3 - 150 damage etc) or random(Level 1 - 50 damage, Level 2 - 75 damage, level 3 175 damage)?

If it's constant, you can use a formula in the damage part of the trigger using the level of ability for triggering unit option, such as:

Deal ((50) x (Level of (Ability Name) for (Triggering unit)

This will set the numbers for the spell to deal 50 damage on level 1, but 300 on level 6. The numbers are of course easily changeable with some simple math in your head.
 
Level 6
Joined
Sep 27, 2008
Messages
258
ok yea that works great for now and i can always change it if it is too much dmg thanks
 
Status
Not open for further replies.
Top