How can I make this skill MUI?

227Minutes

New Member
Reaction score
1
I have a pretty simple 'attacking' skill that one of my units uses..

Trigger:
  • Slash
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Slash
    • Actions
      • Animation - Change (Triggering unit)'s animation speed to 230.00% of its original speed
      • Unit - Pause (Triggering unit)
      • Unit - Order (Triggering unit) to Stop
      • Animation - Play (Triggering unit)'s attack animation
      • Set slashcasterpoint = (Position of (Triggering unit))
      • Set slashpoint = (slashcasterpoint offset by 100.00 towards (Facing of (Triggering unit)) degrees)
      • Set slashgroup = (Units within 100.00 of slashpoint matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
      • Wait 0.11 seconds
      • Unit - Unpause (Triggering unit)
      • Unit Group - Pick every unit in slashgroup and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 150.00 damage of attack type Chaos and damage type Normal
          • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
      • Custom script: call RemoveLocation (udg_slashcasterpoint)
      • Custom script: call RemoveLocation (udg_slashpoint)
      • Custom script: call DestroyGroup (udg_slashgroup)
      • Animation - Change (Triggering unit)'s animation speed to 100.00% of its original speed


Is there any way I can make that MUI? I need the wait in there, otherwise the playing unit animation doesn't work out and the damage timing doesnt work out either.

Also, what other good skills are there that are instant-cast (no target, no casting animation)? I have wind walk and berserk so far, are there any other good ones?

Thanks
 

luorax

Invasion in Duskwood
Reaction score
67
Convert it to JASS, and use local variables. That's the easiest and the most efficien way here (in my opinion)
 

Ayanami

칼리
Reaction score
288
The 0.11 seconds wait does not work. I believe the minimum wait time is 0.60 seconds.
 

tooltiperror

Super Moderator
Reaction score
231
.27 is an urban legend. TSA is just as accurate at any time, but not accurate at any.
 

Sajin

User title under construction.
Reaction score
56
put the caster into a variable in an array of their player number and replace all "triggering unit" with it
variable ex.

Slash_Caster[Player Number of (Owner of (casting unit))]

then make a second trigger and move everything below the Wait into the second trigger then delete the wait.

Then make a countdown timer variable array
Slash_Countdown[Player Number of (Owner of (casting unit))] and add an effect to your first trigger that sets it to 0.11 seconds
ex.

Start Slash_Countdown[Player Number of (Owner of (casting unit))] as a one-show timer that will expire in 0.11 seconds

then for the event of the second trigger where you moved

Trigger:
  • Unit - Unpause (Triggering unit)
    • Unit Group - Pick every unit in slashgroup and do (Actions)
      • Loop - Actions
        • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 150.00 damage of attack type Chaos and damage type Normal
        • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
    • Custom script: call RemoveLocation (udg_slashcasterpoint)
    • Custom script: call RemoveLocation (udg_slashpoint)
    • Custom script: call DestroyGroup (udg_slashgroup)
    • Animation - Change (Triggering unit)'s animation speed to 100.00% of its original speed


in the end the trigger will be

Slash

* Events
o Unit - A unit Starts the effect of an ability
* Conditions
o (Ability being cast) Equal to Slash
* Actions
o Animation - Change (Slash_Caster[Player Number of (Owner of (casting unit))])'s animation speed to 230.00% of its original speed
o Unit - Pause (Slash_Caster[Player Number of (Owner of (casting unit))])
o Unit - Order (Slash_Caster[Player Number of (Owner of (casting unit))]) to Stop
o Animation - Play (Slash_Caster[Player Number of (Owner of (casting unit))])'s attack animation
o Set slashcasterpoint = (Position of (Slash_Caster[Player Number of (Owner of (casting unit))]))
o Set slashpoint = (slashcasterpoint offset by 100.00 towards (Facing of (Slash_Caster[Player Number of (Owner of (casting unit))])) degrees)
o Set slashgroup = (Units within 100.00 of slashpoint matching (((Matching unit) belongs to an enemy of (Owner of (Slash_Caster[Player Number of (Owner of (casting unit))]))) Equal to True))



trigger 2

events

When Slash_Countdown[1] expires
When Slash_Countdown[2] expires
When Slash_Countdown[3] expires
When Slash_Countdown[4] expires
When Slash_Countdown[5] expires
When Slash_Countdown[6] expires
(and so on)

conditions
none

actions
For integer A (1 - 12)
Unit - Unpause (Slash_Caster[Integer A])
Unit Group - Pick every unit in slashgroup and do (Actions)

Loop - Actions
Unit - Cause (Slash_Caster[Integer A]) to damage (Picked unit), dealing 150.00 damage of attack type Chaos and damage type Normal
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
Special Effect - Destroy Last Created Effect
Custom script: call RemoveLocation (udg_slashcasterpoint)
Custom script: call RemoveLocation (udg_slashpoint)
Custom script: call DestroyGroup (udg_slashgroup)
Animation - Change (Slash_Caster[Integer A])'s animation speed to 100.00% of its original speed




This should be MUI but then again I dont have the editior open atm so i cant test it
 

Sui-cookie

You can change this now in User CP.
Reaction score
49
pretty sure that makes it mPi not mUi
i agree with the locals :|
Convert it to JASS, and use local variables. That's the easiest and the most efficien way here (in my opinion)
 

NeuroToxin

New Member
Reaction score
46
Trigger:
  • Slash
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Slash
    • Actions
      • Custom Script: local unit u = GetTriggerUnit()
      • Custom Script: local location p = GetUnitLoc(u)
      • Custom Script: set udg_Casterpoint = p
      • Custom Script: set udg_Caster = u
      • set slashpoint = Casterpoint offset by 100 towards (Facing of (Caster)) degrees
      • Animation - Change Caster's animation speed to 230.00% of its original speed
      • Unit - Pause Caster
      • Unit - Order Caster to Stop
      • Animation - Play Caster's attack animation
      • Set slashcasterpoint = Casterpoint
      • Set slashgroup = (Units within 100.00 of slashpoint matching (((Matching unit) belongs to an enemy of (Owner of (Caster))) Equal to True))
      • Wait 0.11 seconds
      • Unit - Unpause Caster
      • Unit Group - Pick every unit in slashgroup and do (Actions)
        • Loop - Actions
          • Unit - Cause Caster to damage (Picked unit), dealing 150.00 damage of attack type Chaos and damage type Normal
          • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
      • Custom script: call RemoveLocation (udg_Casterpoint)
      • Custom script: call RemoveLocation (udg_slashpoint)
      • Custom script: call DestroyGroup (udg_slashgroup)
      • Animation - Change Caster's animation speed to 100.00% of its original speed
      • Custom Script: set u = null
      • Custom Script: call RemoveLocation(p)


This should work.
Variables:
Unit - Caster
Point - Casterpoint
 

luorax

Invasion in Duskwood
Reaction score
67
Why is this MUI? Your code is near the same as the topic owner's code, but you have 2 useless local variable.

EDIT: I think my code'll work:
JASS:
function Trig_Slash_Conditions takes nothing returns boolean
    return 'AUAn'
endfunction

function Trig_Slash_Filter takes nothing returns boolean
    return IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit()) and GetWidgetLife(GetFilterUnit()) > 0.405
endfunction

function Trig_Slash_Enum takes nothing returns nothing
    call UnitDamageTarget(GetTriggerUnit(), GetEnumUnit(), 150., true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS)
    call AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl", GetEnumUnit(), "chest")
endfunction

function Trig_Slash_Actions takes nothing returns nothing
    local unit u = GetTriggerUnit()
    local real f = GetUnitFacing(u)
    local real x = GetSpellTargetX() + 100 * Cos(f * bj_DEGTORAD)
    local real y = GetSpellTargetY() + 100 * Sin(f * bj_DEGTORAD)
    local group g = CreateGroup()
    
    
    call SetUnitTimeScale(u, 2.3)
    call PauseUnit(u, true)
    call IssueImmediateOrder(u, "stop")
    call SetUnitAnimation(u, "attack")
    call GroupEnumUnitsInRange(g, x, y, 100. function Trig_Slash_Filter)
    
    call TriggerSleepAction(0.11)
    call PauseUnit(u, false)
    call ForGroup(g, function Trig_Slash_Enum)
    call DestroyGroup(g)
    
    call SetUnitTimeScale(u, 1.)
    set g = null
    set u = null
endfunction

//===========================================================================
function InitTrig_Slash takes nothing returns nothing
    set gg_trg_Slash = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Slash, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Slash, Condition( function Trig_Slash_Conditions ) )
    call TriggerAddAction( gg_trg_Slash, function Trig_Slash_Actions )
endfunction


In the next line:
JASS:
return 'AUAn'

Replace " 'AUAn' " with the code of your ability.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top