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

[Trigger] Problem removing special effects.

Status
Not open for further replies.
Level 3
Joined
Dec 28, 2007
Messages
46
Hey im trying to make a spell that when the AOE dummy spell is cast, the spell will freeze all enemies in the area. Right now im just working on the special effect part. I have the effect part down perfectly: A blizzard shard comes down on each unit in the area of the spell and then the unit is frozen.

however after the duration of the spell is over (its channeled) the frozen effect wont go off of the enemies. Its a pretty simple trigger, i think i just have a small thing wrong.

Here is the trigger:

  • freeze
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Freezing Field
    • Actions
      • Unit Group - Pick every unit in (Units within 800.00 of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)) and do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\Blizzard\BlizzardTarget.mdl
      • Wait 0.20 seconds
      • Unit Group - Pick every unit in (Units within 800.00 of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)) and do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\FreezingBreath\FreezingBreathTargetArt.mdl
      • Wait 4.80 seconds
      • Unit Group - Pick every unit in (Units within 800.00 of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)) and do (Actions)
        • Loop - Actions
          • Special Effect - Destroy (Last created special effect)
Thanks for the help in advance guys. :)
 
Level 19
Joined
Nov 16, 2006
Messages
2,165
  • freeze
  • Events
  • Unit - A unit Begins casting an ability
  • Conditions
  • (Ability being cast) Equal to Freezing Field
  • Actions
  • Unit Group - Pick every unit in (Units within 800.00 of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)) and do (Actions)
  • Loop - Actions
  • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\Blizzard\BlizzardTarget.mdl
  • Special Effect - Destroy (Last created special effect)
  • Wait 0.20 seconds
  • Unit Group - Pick every unit in (Units within 800.00 of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)) and do (Actions)
  • Loop - Actions
  • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\FreezingBreath\FreezingBreathTargetArt.mdl
  • Special Effect - Destroy (Last created special effect)
This would be better.
Even that it says that the effect is destroyed, the animation is fully played before it gets destroyed.
 
Level 3
Joined
Dec 28, 2007
Messages
46
For some reason no effects are being destroyed. Its a permanent effect like freezing breath. It just stays there forever and for some reason the trigger isnt removing it.

Thanks.
 
Level 3
Joined
Dec 28, 2007
Messages
46
Ok, I changed it to exactly what you gave me and it definately removes the effect. Just way too soon. It removes it immediately your way. I need the effects to stay on the entire duration of the spell.

Thanks.

**EDIT**
Awesome! I fixed it. I had to make a loop that stored each effect as a separate variable and use a second trigger to destroy the effects. :-D Here is the new trigger:

  • Freeze Effect
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Freezing Field
    • Actions
      • Trigger - Run Freeze Destroy Timer <gen> (ignoring conditions)
      • Special Effect - Create a special effect attached to the origin of (Casting unit) using Abilities\Spells\Human\ManaShield\ManaShieldCaster.mdl
      • Set frozen_effects[0] = (Last created special effect)
      • Set effect_index = 0
      • Unit Group - Pick every unit in (Units within 800.00 of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)) and do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\Blizzard\BlizzardTarget.mdl
      • Wait 0.20 seconds
      • Unit Group - Pick every unit in (Units within 800.00 of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)) and do (Actions)
        • Loop - Actions
          • Set effect_index = (effect_index + 1)
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\FreezingBreath\FreezingBreathTargetArt.mdl
          • Set frozen_effects[effect_index] = (Last created special effect)
  • Freeze Destroy Timer
    • Events
    • Conditions
    • Actions
      • Wait 10.00 seconds
      • For each (Integer A) from 0 to effect_index, do (Actions)
        • Loop - Actions
          • Special Effect - Destroy frozen_effects[(Integer A)]
 
Last edited:
Level 3
Joined
Dec 28, 2007
Messages
46
Ahh yes sorry for the double. Realized it right after i hit submit. :-\

Now im having another problem. I got the effect down perfectly. I also got another trigger to work perfectly that stopped the effects of the spell and removed the visuals if the unit casting moved (spell is channeled).

Here are the problems I am having:

  1. Only one unit is being stunned. I am using locusted invis. units to do the stunning and damaging.
  2. The visual frozen effect is no longer being added for some reason. The blizzard shards are still coming down to each unit, but alas no freeze visual.

Here are my triggers as of now:

The trigger to add the effects to each unit. Also initiates the other triggers:

  • Freeze Effect
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Freezing Field
    • Actions
      • Trigger - Run Freeze Destroy Timer <gen> (ignoring conditions)
      • Trigger - Run Freeze Damage Targets <gen> (ignoring conditions)
      • Special Effect - Create a special effect attached to the origin of (Casting unit) using Abilities\Spells\Human\ManaShield\ManaShieldCaster.mdl
      • Set frozen_effects[0] = (Last created special effect)
      • Set effect_index = 0
      • Wait 0.20 seconds
      • Unit Group - Pick every unit in (Units within 800.00 of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)) and do (Actions)
        • Loop - Actions
          • Set effect_index = (effect_index + 1)
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\FreezingBreath\FreezingBreathTargetArt.mdl
          • Set frozen_effects[effect_index] = (Last created special effect)

The trigger that loops though each effect created and destroys them at the end of the spell's duration:

  • Freeze Destroy Timer
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units within 800.00 of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)) and do (Actions)
            • Loop - Actions
              • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\Blizzard\BlizzardTarget.mdl
          • Wait 2.00 seconds
      • For each (Integer A) from 0 to effect_index, do (Actions)
        • Loop - Actions
          • Special Effect - Destroy frozen_effects[(Integer A)]

The trigger that removes all visuals and stops the effects of the spell if the caster moves:

  • Premature Thaw
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Freezing Field
    • Actions
      • Trigger - Turn off Freeze Destroy Timer <gen>
      • Trigger - Turn off Freeze Effect <gen>
      • For each (Integer A) from 0 to effect_index, do (Actions)
        • Loop - Actions
          • Special Effect - Destroy frozen_effects[(Integer A)]
      • Trigger - Turn on Freeze Destroy Timer <gen>
      • Trigger - Turn on Freeze Effect <gen>

And finally, the trigger that summons the invis units and has them damage and stun all the units caught in the effects of the spell.

  • Freeze Damage Targets
    • Events
    • Conditions
    • Actions
      • Set Freeze_dmg_index = 0
      • Wait 0.20 seconds
      • Unit Group - Pick every unit in (Units within 800.00 of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)) and do (Actions)
        • Loop - Actions
          • Set Dmg_targets[Freeze_dmg_index] = (Picked unit)
          • Unit - Create 1 Freeze Wave Damager for (Owner of (Casting unit)) at (Position of (Picked unit)) facing Default building facing degrees
          • Set Dmg_Dealers[Freeze_dmg_index] = (Last created unit)
      • For each (Integer A) from 0 to Freeze_dmg_index, do (Actions)
        • Loop - Actions
          • Unit - Order Dmg_Dealers[(Integer A)] to Human Mountain King - Storm Bolt Dmg_targets[(Integer A)]
          • Wait 2.00 seconds

Thanks guys.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
First of wall, you don't need the first effect (on caster) because you can just make it from the spell itself.

Actualy, you can do ALL of your effects with the spell without using even 1 trigger line.

Just use a spell similiar to Roar, and change target effects and caster effects, already 50% of your trigger is removed lol.

Then, instead of that stun which will be a nuinsance to make MUI, you can just create a dummy that will cast something like Cluster Rockets (no model for the rockets if you want it invis) in the middle.

And now instead of all those triggers that will be a huge headace to make MUI, you have a trigger with about 4 lines, and its MUI :)

[Tip] check the "Things That Leak" sticky thread.
 
Level 3
Joined
Dec 28, 2007
Messages
46
Ahh. Thanks so much for the help ghost wolf. I didnt even think of using an AOE stun effect for the friggin dummy units LOL.

Is there another spell I can use for the caster that has a clickable AOE like blizzard?

And, also, I saw the leaking sticky but didnt have too much time to check it out when I saw it. I will read it now though.

Thanks!
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
There are tons of spells that are AOE though, I would suggest you to check the "Channel" ability which blizzard made especialy for us, to use as a dummy ability.
Its a bit hard to understand at the start though, so play with it a little :)
Remember to ALWAYS tick the "Visible" in the Options section or else the icon of the ability will be invisible in-game (its default for some "blizzard-y" reason).

And did you see what I said about the special effects ? because it would remove about half of the things you need to do.
Check this lines (they are in ANY ability):

Art - Caster
Art - Caster Attachment Point 1
Art - Caster Attachment Point 2
Art - Caster Attachments 0

Art - Target
Art - Target Attachment Point 1
Art - Target Attachment Point 2
Art - Target Attachment Point 3
Art - Target Attachment Point 4
Art - Target Attachment Point 5
Art - Target Attachment Point 6
Art - Target Attachments 0


The Art - Caster/Target Says what special effect you want to be shown on the caster and on the target.
The attachment points are where the effects would be shown.

Here is a list of normal attachment points taken from thehelper (another world editor site).

Code:
overhead (Floats over the unit' s head, but dosn' t sway with.)

head (Sways with the unit' s animation.)

chest

origin (Usually at the base of a unit' s feet.)

hand


Attachment point modifiers for "hand":



left

right



Additional attachment point modifiers:



foot

weapon (for heroes)

sprite (for buildings)

medium (for buildings)

large (for buildings)

mount (for mounted units)

rear (for quadrupeds)

first (for buildings)

second (for buildings)

third (for buildings)

fourth (for buildings)

fifth (for buildings)

sixth (for buildings)

rallypoint (for buildings)


So for example, if you want it to be on the left hand, it would be "left,hand" (2 strings, not one with a "," in it).

And the Art - Caster/Target Attachments means how much you allow the game to show (I really don't know why blizzard made that).
So if you have for example 3 attachment points, set it to 3.


With this you can practicly remove all the special effects you made there, by using a spell that stays for 10 seconds and works on a AOE around the hero (for example Roar).
Notice that you will need to allow the spell to target enemys (or ONLY enemys, depends how you want it) using the States - Targets Allowed.
 
Level 3
Joined
Dec 28, 2007
Messages
46
Ok so I was able to move all of the special effects to buffs/spell art only. But I couldnt find a way to make an AOE stun spell that had a stun buff to where I could change the art effect of it. SO im back to creating dummy units and then having each one of them cast a single target spell on each of the target units.

Can someone see pretty quickly why these units wouldnt be being removed from the game properly? (The trigger is for testing purposes only, so it uses a testing string and a pre-set non-targeted region).

  • TEST FF 2
    • Events
      • Player - Player 1 (Red) types a chat message containing -test FF 2 as An exact match
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in Region 000 <gen> matching (((Picked unit) belongs to an enemy of Player 1 (Red)) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Freezing Field Stun <DUMMY> for Player 1 (Red) at (Position of (Picked unit)) facing Default building facing degrees
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
      • Wait 0.50 seconds
      • Unit Group - Pick every unit in (Units in Region 000 <gen> matching ((Unit-type of (Picked unit)) Equal to Freezing Field Stun <DUMMY>)) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
I didn't understand your new problem with 1-stun AOE ability, but as a tip, whenever you make a dummy and want to remove him, just add a Expiration time right after you created him (usually like 0,5-2 seconds, depends on what spells you need him for).

Can you explain the problem with the stun AOE ? because after all, the less triggers, the better :)
 
Level 3
Joined
Dec 28, 2007
Messages
46
Let me first explain what I want to happen in a little more detail. I need the spell to freeze units in an AOE and do DoT to them while frozen. This could be around the caster with no target or with a targeted AOE circle. Since they are to be frozen, I need to make a new buff that the stun uses, that has the art of freezing breath's effect (to encase the target in an ice block).

Ok so...

The AOE stuns that I found were:

1. War stomp: Even though I could change the stun buff on this to another buff with different art, I didnt like this because it shook the ground when activated.

2. Inferno: I liked this spell alot for my purposes. It had an AOE target circle, stunned in an area, and even could summon a dummy, timed unit itself that could be used for the DoT damage. The problem was that the stun buff that it gave was no where changeable within the data of the spell. In order to change the art of the actual stun buff. This wasnt good, because then all stun spells would appear to freeze the target. :(

3. Cluster rockets: I had the same problem as with inferno, with not being able to change the stun buff to a different one from within the spell.

Thanks for the tip about using an expiration timer on the dummy units. Ill try that ASAP. :)
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
As I understood, you want a AoE -on the targeted area- and not on the units right ?
I mean, like the fire from Flame Strike (thats the name right?) that stays on the ground ?
I think the easiest solution would be to use blizzard (without model) at the targeted area.
Just order the dummy to cast it and let him live as long as you need the blizz to be casted.

For the stun, just a second (if you are reading it now), ill do some tests and check it out :)

[Edit]

Ok as you said it seems we can't change it.
Even after removing everything I could the stun "spirala" stayed.

So, I think you should cast 3 dummy spells.

One would be the buff thats shown on the targets (could be based on Roar/Channel), one would be the DoT (could be blizzard), and one would be stun (any stun spell).

Since its just 3 orders for 3 dummys with 3 expiration times, I don't see any reason why it wouldn't be MUI, so its also short and also MUI :)
 
Level 3
Joined
Dec 28, 2007
Messages
46
Alright thanks man. :)

**EDIT**

Well I got some help from GhostWolf over AIM and took to the advice he gave me here. I now have gotten the spell to work.

The spell is meant to have a target AOE which freezes all units caught inside and deals damage to them over time. Any units to wander into the area during the duration will be slowed and also take damage.

  1. The modified inferno spell handles the AOE stun.
  2. The summoned dummy unit from inferno handles AOE DoT
  3. The summoned dummy unit from inferno handles AOE slow for any units to enter the effect after the stun goes off
  4. Another dummy unit handles the visual effect of stun with a dummy spell based off of Howl of Terror
  5. The trigger simply makes the HoT unit and makes it cast, then removes it.

Here is the finished trigger. I did it in JASS to remove a leak with "Unit - Create Unit for Player at (Target point of issued order)"

JASS:
//===========================================================================//
// Trigger:         Freezing Field                                           //
//                                                                           //
// Original Script: AlphaChicken                                             //
//                                                                           //
// Credits:         Much Thanks to GhostWolf and Heero at the forums         //
//                  located @ [url]http://www.hiveworkshop.com[/url]                    //
//                                                                           //
// Info:            A deadly atmosphere of sub-zero temperature that freezes //
//                  and damages all units caught within.                     //
//===========================================================================//


function Trig_Freezing_Field_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A000' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Freezing_Field_Actions takes nothing returns nothing
    local location FF_Unit_Intro
    set FF_Unit_Intro = GetSpellTargetLoc()
    call CreateNUnitsAtLoc( 1, 'n001', GetOwningPlayer(GetSpellAbilityUnit()), GetSpellTargetLoc(), 270.0 )
    call UnitApplyTimedLifeBJ( 3.00, 'BTLF', GetLastCreatedUnit() )
    call IssueImmediateOrderBJ( GetLastCreatedUnit(), "howlofterror" )
    call RemoveLocation(FF_Unit_Intro)
    
endfunction

//===========================================================================
function InitTrig_Freezing_Field takes nothing returns nothing
    set gg_trg_Freezing_Field = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Freezing_Field, EVENT_PLAYER_UNIT_SPELL_CAST )
    call TriggerAddCondition( gg_trg_Freezing_Field, Condition( function Trig_Freezing_Field_Conditions ) )
    call TriggerAddAction( gg_trg_Freezing_Field, function Trig_Freezing_Field_Actions )
endfunction



Thanks so much for all the help guys! :thumbs_up::thumbs_up::thumbs_up:
 
Status
Not open for further replies.
Top