• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Force Choke Spell PLEASE!!

Status
Not open for further replies.
Level 3
Joined
Aug 9, 2009
Messages
27
Tried to create a force choke spell, but couldn't figure out anyway to do it.:cry:

If anyone could make one that would be amazing.

Here's what I would like to happen.
- The target is immobilized and unable to attack.
- Raised into the air. (not too high)
- And looses HP over a set amount of time.
- Then returned to the ground, dazed for a set amount of time.
- The caster is unable to move or attack during the spell, but is invulnerable.

Will give extreme credit in the map, heck even in the spell tooltip.
 
Level 7
Joined
May 3, 2007
Messages
210
  • Choke Continous
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Life Drain
    • Actions
      • Unit - Make (Triggering unit) Invulnerable
      • Unit - Add Crow Form to (Target unit of ability being cast)
      • Unit - Pause (Target unit of ability being cast)
      • Unit - Remove Crow Form from (Target unit of ability being cast)
      • Animation - Change (Target unit of ability being cast) flying height to 150.00 at 50.00
      • Wait 7.50 seconds
      • Animation - Change (Target unit of ability being cast) flying height to 0.00 at 500.00
      • Unit - Unpause (Target unit of ability being cast)
      • Unit - Make (Triggering unit) Vulnerable
  • Choke Abrupt
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Life Drain
    • Actions
      • Trigger - Turn off Choke Continous <gen>
      • Animation - Change (Target unit of ability being cast) flying height to 0.00 at 500.00
      • Unit - Unpause (Target unit of ability being cast)
      • Unit - Make (Triggering unit) Vulnerable
      • Trigger - Turn on Choke Continous <gen>
      • Unit - Unpause (Target unit of ability being cast)
It was rushed in GUI, and it doesn't "daze" when the unit hits the ground, but that shouldn't be too hard for you to add yourself, a dummy unit would do the trick.

Just use Life Drain for the damage. If you change the duration then you're going to need to change the wait. If you want the duration to increase over time (for whatever reason) then just have the duration be dependent on the units level, i.e. 8+Level or whatever. You can get rid of the lightning effects and what have you by editing Life Drain of course, and you can always stop the units animation to make him look more "shocked".

Hope this helps, even though its fairly poorly done.
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
Not MUI, even MPI.. flying height must be more (300-600)
Leak at wait, it may cause flying height ot be set 2 times
Using veriables (eg. TempCaster, TempTarget) is better than the constant one.

My suggestion is to make Life Drain MUI spell, which changes flying height while channeling,
using a dummy, for both Life Drain and "Daze" effect.
 
Level 3
Joined
Aug 9, 2009
Messages
27
Thank You both soooo much. Gave both credit in map. In the tooltip for the spell actually. And gave both +rep.
 
Level 7
Joined
May 3, 2007
Messages
210
JASS:
function Trig_Choke_Conditions takes nothing returns boolean    
    return GetSpellAbilityId() == 'ANdr'
endfunction

function CastEndCheck takes unit t returns boolean    
    return GetUnitCurrentOrder(t) == OrderId("drain")
endfunction  

function Trig_Choke_Actions takes nothing returns nothing
  local unit targ = GetSpellTargetUnit()
  local unit cast = GetTriggerUnit()
  local unit dummy
  local real duration = 8
    set dummy = CreateUnit(GetOwningPlayer(cast),'hfoo',GetUnitX(targ),GetUnitY(targ),0) 
    call UnitAddAbility(targ,'Amrf')
    call PauseUnit(targ,true)
    call SetUnitInvulnerable(cast,true)
    call UnitRemoveAbility(targ,'Amrf')
    call SetUnitFlyHeight(targ,150,50)
      loop
          if CastEndCheck(cast) == false then
              set duration = 0
          else
              set duration = duration - 0.50
              call TriggerSleepAction(0.40)
          endif
      exitwhen duration <= 0
      endloop
    call IssueImmediateOrder(dummy,"thunderclap")
    call SetUnitInvulnerable(cast,false)
    call SetUnitFlyHeight(targ,0,700)
    call PauseUnit(targ,false)
    call TriggerSleepAction(0.30)
    call RemoveUnit(dummy)
endfunction

//===========================================================================
function InitTrig_Choke takes nothing returns nothing
    set gg_trg_Choke = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Choke, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Choke, Condition( function Trig_Choke_Conditions ) )
    call TriggerAddAction( gg_trg_Choke, function Trig_Choke_Actions )
endfunction

Does pretty much the exact same except it wasn't done lazily, and it dazes.

You'll need to make a dummy unit, and replace the Unit type Id of whatever unit you used to make teh dummy unit in the set dummy = CreateUnit(...) line. Likewise you'll need to mod a thunderclap orderId spell in order to make it do no damage, or limited damage.

The actual spell lasts about 8.45 seconds with a .30 section margin of error for my own reflex time. If you want to show the thunderclap effect on the ground, increase the last wait before the dummy is removed, don't reduce the wait below .30 or the unit will be removed before it can clap.

Anyway hopefully this ability meets some of MortAr-'s standards, god knows the practice didn't hurt.

Oh and also, the dummy unit I used already had thunderclap as an ability, (which is bad practice I realize), just adding a line to give them the ability i.e. call UnitAddAbility(dummy,AHtc) will make it not require you to have it already on the dummy unit. If you want to trigger damage drain instead of having the life drain do it, that can always be added in the loop, specifically if you need triggered damage for a damage detection.
 
Last edited:
Status
Not open for further replies.
Top