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

Spell isn't working properly, need trigger help D: (+REP TO THOSE THAT HELP ME!)

Status
Not open for further replies.
Level 4
Joined
Jul 26, 2008
Messages
57
:ned: Okay, so... I'm tryna create a spell for my Hero Arena map that, when the unit casts it on a certain point, all units in the surrounding area of the selected point will become immobilized and take periodic damage for 5 seconds. But when I cast it ingame it obviously doesn't work because I fail at triggering >:S (the animation will show up but nothing will happen to the units)

Here's the trigger:

  • Sacred Bind Lv10
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • ((Ability being cast) Equal to Sacred Bind ) and ((Level of Sacred Bind for (Casting unit)) Equal to 10)
    • Actions
      • If (((Target unit of ability being cast) has buff Sacred Prison ) Equal to True) then do (Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 200.00 damage of attack type Spells and damage type Divine) else do (Do nothing)
      • Wait 1.00 game-time seconds
  • (Repeat the above actions 4 more times (damage ticks 5 times) cuz im too lazy to copy & paste it 4 more times :p)
Now as you can see I OBVIOUSLY screwed up somewhere in here, but the thing is I dunno to fix it. So thats where y'all come in. :D

I'd also appreciate some tips on how to better simplify some of my trigger selections. +Moar Rep to those that help me do that, too! :ned:
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Read a hashtable tutorial. Using waits is a sure way to make this spell fail.

Use "unit starts the effect of an ability" rather than "unit begins casting".

Also, is your spell ground targetable. It shouldn't work with "target unit of ability being cast". You need to do this:
  • Set Temp_Loc_1 = Target point of ability being cast
  • Set_Temp_Group_1 = Units withing 400 of Temp_Loc_1 matching...
  • Pick every unit in Temp_Group_1 and do actions...
 
Level 4
Joined
Jul 26, 2008
Messages
57
Read a hashtable tutorial. Using waits is a sure way to make this spell fail.

Use "unit starts the effect of an ability" rather than "unit begins casting".

Also, is your spell ground targetable. It shouldn't work with "target unit of ability being cast". You need to do this:
  • Set Temp_Loc_1 = Target point of ability being cast
  • Set_Temp_Group_1 = Units withing 400 of Temp_Loc_1 matching...
  • Pick every unit in Temp_Group_1 and do actions...

:ned:But what do I set the Variable type of Temp_Loc_1 to in order to access "Target point of ability being cast" with it?
Also to be able to access Temp_Loc_1 with Temp_Group_1?:ned:
 
Level 4
Joined
Nov 7, 2009
Messages
83
First of all, you should check attacked units are actually being buffed, if that fails, then thing will not work.

I think you can do the following.

If units are not getting buffed
  • Sacred Bind
  • Events
    • Unit - A unit Begins casting an ability
  • Conditions
    • (Ability being cast) Equal to Sacred Bind
  • Actions
    • Some custom script to add buff if any
Then, for buffed units
  • Sacred Bind DOT
  • Events
    • Time - Every 1.00 seconds game time
  • Conditions
  • Actions
    • Unit Group - Pick every unit in playable map area matching ((Triggering unit) has buff Sacred Prison) equal to true and do Damage unit for xxx damage
 
Level 3
Joined
Mar 2, 2008
Messages
62
the only reason it isnt damaging anything is because you have the 'target unit of ability being cast', when the ability doesnt target any units. its an area spell, so use 'pick every unit in area matching condition' to check, add them all to a group, and do a loop to damage every unit in that group for one second.

or, better yet, you could solve everything by having a dummy unit cast shackles on every unit in the aoe of the spell, and have that last for 5 seconds. that would immobilise them, and provide the dps.
 
Level 4
Joined
Jul 26, 2008
Messages
57
Well I've been importing my spell into some testmap and it works fine.. you're doing something wrong.

:ned: But how could I be importing it WRONG???? I copied the Trigger(s) from the spellpack into my map, copied the ability into my map and set up the variables (since you cant copy variables, not that I needed to) so that the trigger would work. Then I changed a few settings around (mainly the cosmetic changes (models selection, graphics, etc.)) and applied the ability to the hero.

What the hell could I be doing wrong???? o_O:ned:
 
Status
Not open for further replies.
Top