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

[Trigger] How to make this MUI?

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,603
Hey there.

I have been making my campaign over a year now. Some testers told me that item "Running Shoes" bugs. The reason for this is because it's not "MUI".

So, can someone make this trigger MUI? My brains doesn't have skill to do so. I have put the trigger here and I have attach the map here also. Just open that map, make it MUI and upload it to your post.

  • Running Shoes
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Channel
    • Actions
      • Set Running_Shoes_UNIT = (Attacked unit)
      • Special Effect - Create a special effect attached to the origin of Running_Shoes_UNIT using Abilities\Spells\Other\Doom\DoomTarget.mdl
      • Set Running_Shoes_SE = (Last created special effect)
      • Unit - Set Running_Shoes_UNIT movement speed to ((Default movement speed of Running_Shoes_UNIT) + 50.00)
      • Wait 10.00 seconds
      • Special Effect - Destroy Running_Shoes_SE
      • Unit - Set Running_Shoes_UNIT movement speed to ((Default movement speed of Running_Shoes_UNIT) - 50.00)
The one who can do this will have some rep and credits at the campaign. Thank you beforehand and I hope you can do this quickly. Next version will come in day or two.
 

Attachments

  • Running Shoes.w3x
    17.1 KB · Views: 46
Level 12
Joined
Mar 26, 2005
Messages
790
easy,



set "the target of ability being cast" instead of "attacked" unit


simple :)

  • Running Shoes
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Channel
  • Actions
  • Set Running_Shoes_UNIT = (TARGET UNIT OF ABILITY BEING CAST)
  • Special Effect - Create a special effect attached to the origin of Running_Shoes_UNIT using Abilities\Spells\Other\Doom\DoomTarget.mdl
  • Set Running_Shoes_SE = (Last created special effect)
  • Unit - Set Running_Shoes_UNIT movement speed to ((Default movement speed of Running_Shoes_UNIT) + 50.00)
  • Wait 10.00 seconds
  • Special Effect - Destroy Running_Shoes_SE
  • Unit - Set Running_Shoes_UNIT movement speed to ((Default movement speed of Running_Shoes_UNIT) - 50.00)
 
Fine then do it this way and make locals...
  • Running Shoes
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Custom script: local effect udg_Running_Shoes_SE
      • Custom script: local unit udg_Running_Shoes_UNIT
      • Set Running_Shoes_UNIT = (Triggering unit)
      • Special Effect - Create a special effect attached to the origin of Running_Shoes_UNIT using Abilities\Spells\Other\Doom\DoomTarget.mdl
      • Set Running_Shoes_SE = (Last created special effect)
      • Unit - Set Running_Shoes_UNIT movement speed to ((Default movement speed of Running_Shoes_UNIT) + 50.00)
      • Wait 10.00 seconds
      • Special Effect - Destroy Running_Shoes_SE
      • Unit - Set Running_Shoes_UNIT movement speed to ((Default movement speed of Running_Shoes_UNIT) - 50.00)
      • Custom script: set udg_Running_Shoes_SE = null
      • Custom script: set udg_Running_Shoes_UNIT = null
 
Level 12
Joined
Mar 26, 2005
Messages
790
at least I was true about that "attacked unit"

that trigger wouldnt work in singleplayer also :)


and if you just check if one variable is used, and if used then set that unit=second variable

also with the special efect :)


and in the end make the variables=no unit, no efect
 
Level 7
Joined
Oct 14, 2008
Messages
340
well, you could make your UNIT variable an array with an index size of maximum players..
say your map can have 10 players playing..

refer to your variable as Running_shoes_UNIT[player number of(owner of triggering unit)]

this will have a seperate variable for each player, so it should work MUI no problem.
 
Level 7
Joined
Oct 14, 2008
Messages
340
ahh, so all of the heroes that use it may be owned by the same player?
you could assign a different array number of your UNIT variable based on the type of hero..
but that's if there's no way to get more than one of the same hero.
 
Level 9
Joined
Dec 26, 2007
Messages
202
Ye, it might work, but I have never worked with timers. Perhaps you could make it?

  • Running Shoes
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Channel
  • Actions
  • Set Running_Shoes_UNIT = (Attacked unit)
  • Special Effect - Create a special effect attached to the origin of Running_Shoes_UNIT using Abilities\Spells\Other\Doom\DoomTarget.mdl
  • Set Running_Shoes_SE = (Last created special effect)
  • Unit - Set Running_Shoes_UNIT movement speed to ((Default movement speed of Running_Shoes_UNIT) + 50.00)
  • // Freenhand
  • Countdown Timer - Start Running_Shoes_TIMER as a One-Shot timer that will expire in 10.00 seconds
// Freehand
  • Running Shoes Timer
  • Events
  • Time - Running_Shoes_TIMER expires
  • Conditions
  • Actions
  • Special Effect - Destroy Running_Shoes_SE
  • Unit - Set Running_Shoes_UNIT movement speed to ((Default movement speed of Running_Shoes_UNIT) - 50.00)
 
Level 7
Joined
Oct 14, 2008
Messages
340
  • Running Shoes
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Channel
  • Actions
  • Set Running_Shoes_UNIT = (Attacked unit)
  • Special Effect - Create a special effect attached to the origin of Running_Shoes_UNIT using Abilities\Spells\Other\Doom\DoomTarget.mdl
  • Set Running_Shoes_SE = (Last created special effect)
  • Unit - Set Running_Shoes_UNIT movement speed to ((Default movement speed of Running_Shoes_UNIT) + 50.00)
  • // Freenhand
  • Countdown Timer - Start Running_Shoes_TIMER as a One-Shot timer that will expire in 10.00 seconds
// Freehand
  • Running Shoes Timer
  • Events
  • Time - Running_Shoes_TIMER expires
  • Conditions
  • Actions
  • Special Effect - Destroy Running_Shoes_SE
  • Unit - Set Running_Shoes_UNIT movement speed to ((Default movement speed of Running_Shoes_UNIT) - 50.00)

There's really no need for the second trigger there, you can use the "wait for condition" action, the condition of course being "real comparison time left on your timer == 0.00"

and this still doesnt solve his MUI problem.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Your spell didn't even work at all before.

  • Running Shoes
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Channel
    • Actions
      • Custom script: local effect udg_Running_Shoes_SE
      • Special Effect - Create a special effect attached to the origin of (Triggering Unit) using Abilities\Spells\Other\Doom\DoomTarget.mdl
      • Set Running_Shoes_SE = (Last created special effect)
      • Unit - Set (Triggering Unit) movement speed to ((Default movement speed of (Triggering Unit)) + 50.00)
      • Wait 10.00 seconds
      • Special Effect - Destroy Running_Shoes_SE
      • Unit - Set (Triggering Unit) movement speed to ((Default movement speed of Running_Shoes_UNIT) - 50.00)
      • Custom script: set udg_Running_Shoes_SE = null
 
Level 37
Joined
Aug 14, 2006
Messages
7,603
Well, it worked until I started to edit it and it's currently half done which means it doesn't work at all. Wanna see the old trigger? Here.

  • Running Shoes
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) is in (Units owned by Player 1 (Red))) Equal to True
      • ((Unit-type of (Attacked unit)) is A Hero) Equal to True
      • ((Attacking unit) is in (Units owned by Neutral Hostile)) Equal to True
      • ((Attacked unit) has an item of type Running Shoes) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Set Running_Shoes_UNIT = (Attacked unit)
      • Special Effect - Create a special effect attached to the origin of Running_Shoes_UNIT using Abilities\Spells\Other\Doom\DoomTarget.mdl
      • Set Running_Shoes_SE = (Last created special effect)
      • Unit - Set Running_Shoes_UNIT movement speed to ((Default movement speed of Running_Shoes_UNIT) + 50.00)
      • Wait 10.00 seconds
      • Special Effect - Destroy Running_Shoes_SE
      • Unit - Set Running_Shoes_UNIT movement speed to ((Default movement speed of Running_Shoes_UNIT) - 50.00)
      • Wait 60.00 seconds
      • Trigger - Turn on (This trigger)
 
Level 7
Joined
Oct 14, 2008
Messages
340
Would this not work?
JASS:
function Trig_runShoes_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A000'//replace A000 with your spell ID
endfunction

function Trig_runShoes_Actions takes nothing returns nothing
    local unit u = GetTriggerUnit()
    local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomTarget.mdl", u, "origin") 
    call SetUnitMoveSpeed(u, (GetUnitDefaultMoveSpeed(u)+50.0))
    call TriggerSleepAction(10.0)
    call SetUnitMoveSpeed(u, (GetUnitDefaultMoveSpeed(u)-50.0))
    call DestroyEffect(e)
    set e = null
endfunction
//===========================
function InitTrig_Running_Shoes takes nothing returns nothing
    set gg_trg_runningShoes = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_runningShoes, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_runningShoes, Condition( function Trig_runShoes_Conditions ) )
    call TriggerAddAction( gg_trg_runningShoes, function Trig_runShoes_Actions )
endfunction
 
Level 37
Joined
Aug 14, 2006
Messages
7,603
The trigger PurplePoot posted is correct MUI, use that one.
Really? I see, I didn't check it close enough, shame that he didn't post a map... now I have to do everything. :<

Well, anyway, I check if that works. I'll be back soon.

About that JASS, I don't understand it. X_x

EDIT: Ok, it works. Thanks guy, especially to you, PurplePoot. I first didn't understand you made for me the right code. Now I learned a new thing, locals. This will improve the campaign and now I can make more things with new trick. I wonder what I'll do next. :p

Okay, once again, thanks everyone. Rep will be added to everyone who helped me even just a little, and credit goes to PurplePoot.
 
Last edited:
Status
Not open for further replies.
Top