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

[Solved] Any easy solution for this system?

Status
Not open for further replies.
Level 18
Joined
Jun 2, 2009
Messages
1,233
I just want to slow targeted unit for 2 seconds. I have a lot of cripple and slow abilities and this ability have to be unique
Wait condition now works in here. Trigger could not find Target unit of ability being cast. It would be super easy if i would able to use triggering unit in here.

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Slow //
  • Actions
    • Unit - Add Slow // aura to (Target unit of ability being cast)
    • Set TempUnitSlow[(Player number of (Owner of (Target unit of ability being cast)))] = (Target unit of ability being cast)
    • Wait 2.00 seconds
    • Unit - Remove Slow // aura from TempUnitSlow[(Player number of (Owner of (Target unit of ability being cast)))]
    • Unit - Remove Endurance Aura buff from TempUnitSlow[(Player number of (Owner of (Target unit of ability being cast)))]
This one works but it is not mpi/mui.

  • Unit - Remove Slow // aura from TempUnit
  • Unit - Remove Endurance Aura buff from TempUnit
Any easy solution for this one?

Update: I have solved this by my own via GST System by @Uncle but still i believe there should be easier way to do that.
 
Last edited:
Level 29
Joined
Sep 26, 2009
Messages
2,595
there is no (Target unit of ability being cast) after the wait action and some other spell may assign unit into tempUnitSlow during the 2 second wait.
Simplest thing would be to use Custom script actions to create a local unit variable which will persist after the wait.
If you use JASS in your map it could look like this:
  • Custom script: local unit target
  • Set TempUnit = (Target unit of ability being cast)
  • Unit - Add Slow to TempUnit
  • Custom script: set target = udg_TempUnit
  • Wait 2.00 seconds
  • Custom script: set udg_TempUnit = target
  • Unit - Remove Slow from TempUnit
  • Unit - Remove Endurance Aura buff from TempUnit
  • Custom script: set target = null //local variables must be nulled after use
 
Level 18
Joined
Jun 2, 2009
Messages
1,233
there is no (Target unit of ability being cast) after the wait action and some other spell may assign unit into tempUnitSlow during the 2 second wait.
Simplest thing would be to use Custom script actions to create a local unit variable which will persist after the wait.
If you use JASS in your map it could look like this:
  • Custom script: local unit target
  • Set TempUnit = (Target unit of ability being cast)
  • Unit - Add Slow to TempUnit
  • Custom script: set target = udg_TempUnit
  • Wait 2.00 seconds
  • Custom script: set udg_TempUnit = target
  • Unit - Remove Slow from TempUnit
  • Unit - Remove Endurance Aura buff from TempUnit
  • Custom script: set target = null //local variables must be nulled after use
Thank you so much. My friend will help me about Jass. Thank you.
 
Status
Not open for further replies.
Top