• 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.

Convert a spell to MUI (Jass)

Status
Not open for further replies.
  • Sleeping Draught
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sleeping Draught
    • Actions
      • Wait 1.00 seconds
      • Unit - Create 1 Cloud for (Owner of (Triggering unit)) at (Target point of ability being cast) facing (Position of (Triggering unit))
      • Set UnitVariable2 = (Last created unit)
      • Set Unit_Group2 = (Units within 400.00 of (Target point of ability being cast) matching (((Picked unit) is A ground unit) Equal to True))
      • Unit Group - Pick every unit in Unit_Group2 and do (Unit - Pause (Picked unit))
      • Unit Group - Pick every unit in Unit_Group2 and do (Animation - Play (Picked unit)'s death animation)
      • Wait 3.00 seconds
      • Unit - Kill UnitVariable2
      • Wait 2.00 seconds
      • Unit Group - Pick every unit in Unit_Group2 and do (Unit - Unpause (Picked unit))
      • Special Effect - Destroy Special_Effect
Can some1 convert this into Jass, and MUI. Then tell me exactly how to import it and what to change, cause I don't know Jass...

Rep to those who helps me!
 
Use this trigger to run the effects, just remembert to correct the DummyUnit_ID whit your own (Replace "hfoo" with the code for "Cloud"(CTRL+D in We will show it)).
JASS:
function SDConditions takes nothing returns boolean
    return (IsUnitType(GetFilterUnit(), UNIT_TYPE_GROUND) == true)
endfunction

function SDActions1 takes nothing returns nothing
    call PauseUnitBJ(true, GetEnumUnit())
    call SetUnitAnimation(GetEnumUnit(), "death")
endfunction

function SDActions2 takes nothing returns nothing
    call PauseUnitBJ(false, GetEnumUnit())
endfunction

function SDFunction takes nothing returns nothing
    local unit c = GetTriggerUnit()
    local unit d
    local location t = GetSpellTargetLoc()
    local group g = GetUnitsInRangeOfLocMatching(400.00, t, Condition(function SDConditions))
    call TriggerSleepAction(1.00)
    call CreateNUnitsAtLoc(1, 'hfoo', GetOwningPlayer(c), t, bj_UNIT_FACING)
    set d = GetLastCreatedUnit()
    call UnitApplyTimedLifeBJ(10.00, 'BTLF', d)
    call ForGroupBJ(g, function SDActions1)
    call TriggerSleepAction(5.00)
    call ForGroupBJ(g, function SDActions2)
endfunction

To add Jass, go to "Edit>Convert to Custom Text" and paste. Remember to past this before creating the trigger to init it:

  • SleepingDraught
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sleeping Draught
    • Actions
      • Custom script: call SDFunction()

Hope it works! :D
 
Status
Not open for further replies.
Top