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

Simple Problem with Stasis ability

Status
Not open for further replies.
Level 2
Joined
Feb 15, 2008
Messages
13
Hello everyone, I'm new to the Workshop, but I have a quick problem with a trigger that I'd like help with. It's probably really simple, but I've never really done anything with the trigger system so I'm lost. Anyway, I basically wanted to create an ultimate spell for a unit that essentially works the same way that the arbiter's stasis field does for starcraft where the targeted unit is placed in crystal but is invulnerable to damage and cannot move.

I used the art target for the frost wyrm's freezing breath to crystallize the target and I pause it to stop it and I can make it invulnerable, but somehow I can't seem to get the trigger to turn off. I want the duration for a hero to be 15 seconds and for any other unit 25 seconds. Since this is my first real custom spell, I'd prefer it to be kept as simple as possible, but I'll take any help I can get.

Thanks!


Oh, I've posted what I have for the trigger so far.

Stasis Crystal
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Stasis Crystal
Actions
Special Effect - Create a special effect attached to the overhead of (Target unit of ability being cast) using abilities\Spells\Undead\FreezingBreath\FreezingBreathTargetArt.mdl
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Target unit of ability being cast) is A Hero) Equal to True
Then - Actions
Unit - Make (Target unit of ability being cast) Invulnerable
Wait 15.00 seconds
Unit - Make (Target unit of ability being cast) Vulnerable
Else - Actions
Do nothing
Unit - Make (Target unit of ability being cast) Invulnerable
Unit - Pause (Target unit of ability being cast)
Wait 25.00 seconds
Unit - Unpause (Triggering unit)
Unit - Make (Target unit of ability being cast) Vulnerable

Oh, I forgot to mention that I was trying to get a buff for the ability to describe what's happening, but if it's not feasible I'll just abandon that part.
 
Level 13
Joined
Nov 4, 2006
Messages
1,239
just use the freezing breath ability, change allowed targets to ground(or which target you like) and set duration for heros to 15 sec and normal to 25, you only need a trigger for making the unit invulnerable then:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Target unit of ability being cast) is A Hero) Equal to True
Then - Actions
Unit - Make (Target unit of ability being cast) Invulnerable
Wait 15.00 seconds
Unit - Make (Target unit of ability being cast) Vulnerable
Else - Actions
Do nothing
If - Conditions
((Target unit of ability being cast) is A Hero) Equal to false
Then - Actions
Unit - Make (Target unit of ability being cast) Invulnerable
Wait 25.00 seconds
Unit - Make (Target unit of ability being cast) Vulnerable
Else - Actions
Do nothing
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Welcome to The Hiveworkshop ^^
You'll need a variable for this
To Create A variable open Variable Editor (X shaped)
Create an Unit variable named TempUnit
Create a Special Effect variable named TempEffect

  • Stasis Crystal
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Stasis Crystal
  • Actions
    • Custom script: local unit udg_TempUnit
    • Custom script: local effect udg_TempEffect
    • Set TempUnit = (Target unit of ability being cast)
    • Special Effect - Create a special effect attached to the overhead of (Target unit of ability being cast) using abilities\Spells\Undead\FreezingBreath\FreezingBreathTargetArt.mdl
    • Set TempEffect = (Last Created Special Effect)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Target unit of ability being cast) is A Hero) Equal to True
        • Then - Actions
          • Unit - Make TempUnit Invulnerable
          • Unit - Pause TempUnit
          • Wait 15.00 seconds
          • Unit - Unpause TempUnit
          • Unit - Make TempUnit Vulnerable
          • Else - Actions
            • Unit - Make TempUnit Invulnerable
            • Unit - Pause TempUnit
            • Wait 25.00 seconds
            • Unit - Unpause TempUnit
            • Unit - Make TempUnit Vulnerable
    • Special Effect - Destroy TempEffect
    • Set TempUnit = No Unit
I think this ability should pause and make invulnurable a hero for 15 and a normal unit for 25 seconds
This one will work if this is what are you trying to do
 
Level 2
Joined
Feb 15, 2008
Messages
13
Well, the spell paused them for the given duration and trapped them in the crystal, but the invulnerability doesn't work. Its better than what happened the first time when the trigger was indefinite, though. For some reason the temp unit format doesn't work for the invulnerability.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Try adding it Invulnurability ability and removing it instead of make unit invulnurable
All custom scripts all required to work btw :p
 
Level 2
Joined
Feb 15, 2008
Messages
13
Hey everyone, it's me again. I tried both recommendations and I still don't know why it won't work. It freezes and pauses the unit and the duration is right, but the unit just won't become invulnerable. I have a feeling that I'm doing something wrong and that it's probably really simple.

[TRIGGER=Here is what I have]
Stasis Crystal
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Stasis Crystal
Actions
Custom script: local unit udg_TempUnit
Custom script: local effect udg_TempEffect
Set TempUnit = (Target unit of ability being cast)
Special Effect - Create a special effect attached to the overhead of TempUnit using Abilities\Spells\Undead\FreezingBreath\FreezingBreathTargetArt.mdl
Set TempEffect = (Last created special effect)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Target unit of ability being cast) is A Hero) Equal to True
Then - Actions
Unit - Add Invulnerable (Neutral) to TempUnit
Unit - Pause TempUnit
Wait 15.00 seconds
Unit - Remove Invulnerable (Neutral) from TempUnit
Unit - Unpause TempUnit
Else - Actions
Unit - Add Invulnerable (Neutral) to TempUnit
Unit - Pause TempUnit
Wait 25.00 seconds
Unit - Unpause TempUnit
Unit - Remove Invulnerable (Neutral) from TempUnit
Special Effect - Destroy TempEffect
Set TempUnit = No unit
[/TRIGGER]
 
Last edited by a moderator:
Level 13
Joined
Nov 4, 2006
Messages
1,239
Hey dude, i might have a solution to your problem although its not excactly what you wanted, use sleep as your ability, change the target animation to freezing breath and the stun time 15 sec, the duration for heros to 15 and for normal units to 25, the only problem to this is that normal units get vulnerable after 15 sec, because you can only select one stun time, but they are still asleep for 10 more sec and also the effect lasts. maybe someone else has an idea how to select another stun time for normal units.

i have attached a map where you can copy it or look at it, i gave the dreadlords the ability
 

Attachments

  • freeze.w3x
    17.9 KB · Views: 51
Level 13
Joined
Nov 4, 2006
Messages
1,239
whats so weird in this, well actually i don't know if i translated everything correctly, cause my WE is german, but if you look at the map, i made a new ability based on sleep and called it stasis crystal, it should become clear.
and don't look at the triggers in the map, you don't need any for this ability, but i left my tries in
 
Level 2
Joined
Feb 15, 2008
Messages
13
Hey, thanks UreDe4D! That's exactly what I was looking for, actually. Anyway, about the stun times, I'm not exactly sure what to do about that. Maybe some kind of if then trigger to extend the duration for heroes?
 
Status
Not open for further replies.
Top