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

[Trigger] Blink Explosion Spell

Status
Not open for further replies.
Level 25
Joined
Mar 23, 2008
Messages
1,813
Heya, ive done this simple Blink Explosion Spell and i was wondering if its anything i can do to make this spell easier; like if its any way to remove the invulnerable/vulnerable stuff or if its any unnecessary things?
  • Events
    • Unit - A unit Begins casting an ability
  • Conditions
    • (Ability being cast) Equal to Blink Explosion
  • Actions
    • Unit - Make (Triggering unit) Invulnerable
    • Wait 0.01 seconds
    • Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 300.00 at (Position of (Triggering unit)), dealing 100.00 damage of attack type Spells and damage type Normal
    • Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
    • Wait 0.01 seconds
    • Unit - Make (Triggering unit) Vulnerable
 
Level 5
Joined
Aug 27, 2007
Messages
138
Just some extra things:

-Waits of .01 second usually last around .22 seconds
-Damage area causes desyncs and damages everything in the area. Enum the units in range that you want to be affected and damage them instead.
-Destroy that special effect. Add a line immediately after it destroying the last created special effect. If you don't it will leak, and, no matter when you destroy it, it will still plays its birth animation, which, with that effect, is all we see anyway.
-If this is supposed to teleport, it would be better if you based it off of a point-target spell and used the JASS functions SetUnitX(GetTriggerUnit(), GetLocationX(GetSpellTargetLoc())) and SetUnitY(GetTriggerUnit(), GetLocationY(GetSpellTargetLoc())). These do not interrupt orders, and they would eliminate the need (I think) for those waits of yours.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
@Alkonis
Destroying an effect plays it's destruction animation, not it's birth ;)
He has surely based his spell on blink
 
Level 16
Joined
Feb 22, 2006
Messages
960
also u should set the postion of the casting unit in a variable and destroy it in the end, so that there is no leak, also i would prefer to pick every unit in a range of 300 of casting unit matching unit is a enemy of casting unit and matching unit is a buliding equal to false
then order to damage the casting unit all units in the unitgroup^^ so u dont have to make the casting unit invulnerable
 
  • Blink
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blink
    • Actions
      • Set UnitVarCaster2 = (Triggering unit)
      • Set TempLoc8 = (Target point of ability being cast)
      • Unit - Make UnitVarCaster2 Invulnerable
      • Special Effect - Create a special effect at TempLoc8 using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Set GroupVar1 = (Units within 150.00 of TempLoc8 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is dead) Equal to False) and (((Owner of (Matching unit)) is an enemy of (Owner of UnitVarCaster2)) Equal to True))))
      • Unit Group - Pick every unit in GroupVar1 and do (Actions)
        • Loop - Actions
          • Unit - Cause UnitVarCaster2 to damage (Picked unit), dealing (90.00 x (Real((Level of Blink for UnitVarCaster2)))) damage of attack type Spells and damage type Normal
      • Unit - Make UnitVarCaster2 Vulnerable
      • Custom script: call RemoveLocation(udg_TempLoc8)
      • Custom script: call DestroyGroup (udg_GroupVar1)
Try this one(i made it on my map so you can change variable names)
But im not sure if it will work i didn't test it :S
 
Level 1
Joined
Jul 16, 2008
Messages
5
Fagge gj m8 u rock!! WOHO continue with ur freakin map or whateva u doin cuz u OWN. OWN I TELL U!! OWN!!!!
 
Level 17
Joined
May 6, 2008
Messages
1,598
Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 500.00 at (Center of (Playable map area)), dealing 100.00 damage of attack type Spells and damage type Normal
 
Right, make a Unit Group variable called TempGroup, and a Special Effect variable called BlinkEffect then do this trigger
  • Blink
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Blink
    • Actions
      • Custom script: local effect udg_BlinkEffect
      • Custom script: call GroupEnumUnitsInRange(udg_TempGroup, GetUnitX(GetTriggerUnit(), GetUnitY(GetTriggerUnit()), 300.00, null)
      • Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
      • Set BlinkEffect = (Last created special effect)
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 100.00 damage of attack type Spells and damage type Normal
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Custom script: set udg_TempGroup = null
      • Wait 2.00 seconds
      • Special Effect - Destroy BlinkEffect
      • Custom script: set udg_BlinkEffect = null
This will avoid using Waits for 0.01 secs (which don't work properly and will actually wait for something like 0.2 secs instead) and you will have no need to make him invulnerable. It also makes it completely MUI and removes the special effect leak.
 
Level 17
Joined
May 6, 2008
Messages
1,598
Then make a If condition is an enemy of triggering unit equal to true then do that else nothing.
 
Status
Not open for further replies.
Top