• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] MUI - Spell help

Status
Not open for further replies.
I made sort of cinematic spell, it all works nice... The problem is that its not MUI. I have no idea how to make it so, I have seen some actions "Player Number of Triggering Unit"(or something like that) But what do i do now there is not just triggering unit its also a targeted unit.
So if someone would be that kind to just edit this trigger to be MUI?
(And please, if someone will start again with words "Learn Jass" and simmilar stuff... I don't want to learn it)

  • Shadow Fury
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Fury
    • Actions
      • Set UnitVarCaster = (Triggering unit)
      • Set UnitVarTarget = (Target unit of ability being cast)
      • Wait 0.01 game-time seconds
      • Unit - Make UnitVarCaster Invulnerable
      • Unit - Pause UnitVarCaster
      • Animation - Change UnitVarCaster's animation speed to 200.00% of its original speed
      • Special Effect - Create a special effect attached to the hand, right of UnitVarCaster using Abilities\Weapons\PhoenixMissile\Phoenix_Missile_mini.mdl
      • Set SpecialEffect[1] = (Last created special effect)
      • Special Effect - Create a special effect attached to the hand, left of UnitVarCaster using Abilities\Weapons\PhoenixMissile\Phoenix_Missile_mini.mdl
      • Set SpecialEffect[2] = (Last created special effect)
      • For each (Integer A) from 1 to 20, do (Actions)
        • Loop - Actions
          • Wait 0.20 seconds
          • Animation - Play UnitVarCaster's attack animation
          • Set TempLoc01 = (Position of UnitVarTarget)
          • Set TempLoc02 = (Random point in (Region centered at TempLoc01 with size (70.00, 70.00)))
          • Unit - Move UnitVarCaster instantly to TempLoc02, facing TempLoc01
          • Unit - Make UnitVarCaster face UnitVarTarget over 0.00 seconds
          • Unit - Cause UnitVarCaster to damage UnitVarTarget, dealing 50.00 damage of attack type Spells and damage type Normal
          • Special Effect - Create a special effect attached to the origin of UnitVarCaster using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect attached to the chest of UnitVarTarget using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
          • Special Effect - Destroy (Last created special effect)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Life of UnitVarTarget) Less than 60.00
            • Then - Actions
              • Unit - Make UnitVarCaster face UnitVarTarget over 0.00 seconds
              • Animation - Play UnitVarCaster's attack animation
              • Unit - Pause UnitVarTarget
              • Animation - Change UnitVarCaster's animation speed to 25.00% of its original speed
              • Animation - Change UnitVarTarget's animation speed to 25.00% of its original speed
              • Wait 1.85 game-time seconds
              • Animation - Play UnitVarTarget's death animation
              • Special Effect - Create a special effect attached to the head of UnitVarTarget using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect attached to the chest of UnitVarTarget using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect attached to the origin of UnitVarTarget using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect attached to the hand, left of UnitVarTarget using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect attached to the hand, right of UnitVarTarget using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
              • Special Effect - Destroy (Last created special effect)
              • Set TempLoc03 = (Position of UnitVarTarget)
              • Special Effect - Create a special effect at TempLoc03 using Abilities\Weapons\MeatwagonMissile\MeatwagonMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Animation - Change UnitVarTarget's animation speed to 100.00% of its original speed
              • Wait 0.01 game-time seconds
              • Unit - Explode UnitVarTarget
              • Unit - Unpause UnitVarTarget
              • Wait 1.00 game-time seconds
              • Animation - Reset UnitVarCaster's animation
              • Unit - Make UnitVarCaster Vulnerable
              • Unit - Unpause UnitVarCaster
              • Animation - Change UnitVarCaster's animation speed to 100.00% of its original speed
              • Special Effect - Destroy SpecialEffect[1]
              • Special Effect - Destroy SpecialEffect[2]
              • Custom script: call RemoveLocation (udg_TempLoc01)
              • Custom script: call RemoveLocation (udg_TempLoc02)
              • Custom script: call RemoveLocation (udg_TempLoc03)
              • Skip remaining actions
            • Else - Actions
      • Unit - Make UnitVarCaster Vulnerable
      • Unit - Unpause UnitVarCaster
      • Animation - Reset UnitVarCaster's animation
      • Animation - Change UnitVarCaster's animation speed to 100.00% of its original speed
      • Special Effect - Destroy SpecialEffect[1]
      • Special Effect - Destroy SpecialEffect[2]
      • Custom script: call RemoveLocation (udg_TempLoc01)
      • Custom script: call RemoveLocation (udg_TempLoc02)
Thanks!

-BerZeKeR-

Edit: Here is a spell Shadow Fury
 
Level 6
Joined
Dec 28, 2007
Messages
178
there's an easy way: store every unit location etc. in variables[array12] like this:
set var. - variable[player number(of owner(of *triggering* unit)] = triggering unit
*triggering* must be the same in every variable in the same trigger
However, with this method its a bit hard to handle multyple-triggered spells.
In addition, it cannot be casted by more than 1 unit per player but can be casted by more than 1 palyer at the same time.
 
I could handle this, but there is targeted unit of ability being cast not only the triggering unit, or does targeted unit in this case counts as triggered and it doesn't fuck up the whole trigger?

Edit:
  • Shadow Fury Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Fury
    • Actions
      • Wait 0.01 game-time seconds
      • Unit - Make MUI[(Player number of (Owner of (Triggering unit)))] Invulnerable
      • Unit - Pause MUI[(Player number of (Owner of (Triggering unit)))]
      • Animation - Change MUI[(Player number of (Owner of (Triggering unit)))]'s animation speed to 200.00% of its original speed
      • Special Effect - Create a special effect attached to the hand, right of MUI[(Player number of (Owner of (Triggering unit)))] using Abilities\Weapons\PhoenixMissile\Phoenix_Missile_mini.mdl
      • Set SpecialEffect[1] = (Last created special effect)
      • Special Effect - Create a special effect attached to the hand, left of MUI[(Player number of (Owner of (Triggering unit)))] using Abilities\Weapons\PhoenixMissile\Phoenix_Missile_mini.mdl
      • Set SpecialEffect[2] = (Last created special effect)
      • For each (Integer A) from 1 to 20, do (Actions)
        • Loop - Actions
          • Wait 0.20 seconds
          • Animation - Play MUI[(Player number of (Owner of (Triggering unit)))]'s attack animation
          • Set TempLoc01 = (Position of MUI[(Player number of (Owner of (Target unit of ability being cast)))])
          • Set TempLoc02 = (Random point in (Region centered at TempLoc01 with size (70.00, 70.00)))
          • Unit - Move MUI[(Player number of (Owner of (Triggering unit)))] instantly to TempLoc02, facing TempLoc01
          • Unit - Make MUI[(Player number of (Owner of (Triggering unit)))] face MUI[(Player number of (Owner of (Target unit of ability being cast)))] over 0.00 seconds
          • Unit - Cause MUI[(Player number of (Owner of (Triggering unit)))] to damage MUI[(Player number of (Owner of (Target unit of ability being cast)))], dealing 50.00 damage of attack type Spells and damage type Normal
          • Special Effect - Create a special effect attached to the origin of MUI[(Player number of (Owner of (Triggering unit)))] using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect attached to the chest of MUI[(Player number of (Owner of (Target unit of ability being cast)))] using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
          • Special Effect - Destroy (Last created special effect)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Life of UnitVarTarget) Less than 60.00
            • Then - Actions
              • Unit - Make MUI[(Player number of (Owner of (Triggering unit)))] face MUI[(Player number of (Owner of (Target unit of ability being cast)))] over 0.00 seconds
              • Animation - Play MUI[(Player number of (Owner of (Triggering unit)))]'s attack animation
              • Unit - Pause MUI[(Player number of (Owner of (Target unit of ability being cast)))]
              • Animation - Change MUI[(Player number of (Owner of (Triggering unit)))]'s animation speed to 25.00% of its original speed
              • Animation - Change MUI[(Player number of (Owner of (Target unit of ability being cast)))]'s animation speed to 25.00% of its original speed
              • Wait 1.85 game-time seconds
              • Animation - Play MUI[(Player number of (Owner of (Target unit of ability being cast)))]'s death animation
              • Set TempLoc03 = (Position of MUI[(Player number of (Owner of (Target unit of ability being cast)))])
              • Animation - Change MUI[(Player number of (Owner of (Target unit of ability being cast)))]'s animation speed to 100.00% of its original speed
              • Wait 0.01 game-time seconds
              • Unit - Explode MUI[(Player number of (Owner of (Target unit of ability being cast)))]
              • Unit - Unpause MUI[(Player number of (Owner of (Target unit of ability being cast)))]
              • Wait 1.00 game-time seconds
              • Animation - Reset MUI[(Player number of (Owner of (Triggering unit)))]'s animation
              • Unit - Make MUI[(Player number of (Owner of (Triggering unit)))] Vulnerable
              • Unit - Unpause MUI[(Player number of (Owner of (Triggering unit)))]
              • Animation - Change MUI[(Player number of (Owner of (Triggering unit)))]'s animation speed to 100.00% of its original speed
              • Special Effect - Destroy SpecialEffect[1]
              • Special Effect - Destroy SpecialEffect[2]
              • Custom script: call RemoveLocation (udg_TempLoc01[(Player number of (Owner of (Targeted unit of ability being cast)))])
              • Custom script: call RemoveLocation (udg_TempLoc02)
              • Custom script: call RemoveLocation (udg_TempLoc03[(Player number of (Owner of (Targeted unit of ability being cast)))])
              • Skip remaining actions
            • Else - Actions
      • Unit - Make MUI[(Player number of (Owner of (Triggering unit)))] Vulnerable
      • Unit - Unpause MUI[(Player number of (Owner of (Triggering unit)))]
      • Animation - Reset MUI[(Player number of (Owner of (Triggering unit)))]'s animation
      • Animation - Change MUI[(Player number of (Owner of (Triggering unit)))]'s animation speed to 100.00% of its original speed
      • Special Effect - Destroy SpecialEffect[1]
      • Special Effect - Destroy SpecialEffect[2]
      • Custom script: call RemoveLocation (udg_TempLoc01[(Player number of (Owner of (Targeted unit of ability being cast)))])
      • Custom script: call RemoveLocation (udg_TempLoc02)


The whole thing is totally wrong. D:
 
Last edited:
Level 6
Joined
Dec 28, 2007
Messages
178
you must set 1st the variables before doin anything with them :)
start with:
set variable - caster[player number(of owner(of casting unit))] = casting unit
set variable - target[player number(of owner(of casting unit*casting unit again to save it in the same array*))] = targeted unit of ability being cast
Unit - Make caster[(Player number of (Owner of (casting unit)))] Invulnerable
Unit - Pause target[(Player number of (Owner of (casting unit)))]

and do the same with effects
set variable - effect1[player number(of owner(of casting unit))] = last created special effect
 
Ok, this is somehow a bit clearer, but how do i set the point(and how to remove it) and do I need a new variable for each new special effect?

  • Shadow Fury Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Fury
    • Actions
      • Set Caster[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Set Target[(Player number of (Owner of (Target unit of ability being cast)))] = (Target unit of ability being cast)
      • Wait 0.01 game-time seconds
      • Unit - Make Caster[(Player number of (Owner of (Triggering unit)))] Invulnerable
      • Unit - Pause Caster[(Player number of (Owner of (Triggering unit)))]
      • Animation - Change Caster[(Player number of (Owner of (Triggering unit)))]'s animation speed to 200.00% of its original speed
      • For each (Integer A) from 1 to 20, do (Actions)
        • Loop - Actions
          • Wait 0.20 seconds
          • Animation - Play Caster[(Player number of (Owner of (Triggering unit)))]'s attack animation
          • -------- Set Loc? --------
          • Set TempLoc01 = (Position of Target[(Player number of (Owner of (Target unit of ability being cast)))])
          • Set TempLoc02 = (Random point in (Region centered at TempLoc01 with size (70.00, 70.00)))
          • Unit - Move Caster[(Player number of (Owner of (Triggering unit)))] instantly to TempLoc01, facing TempLoc02
          • Unit - Make Caster[(Player number of (Owner of (Triggering unit)))] face Target[(Player number of (Owner of (Target unit of ability being cast)))] over 0.00 seconds
          • Unit - Cause Caster[(Player number of (Owner of (Triggering unit)))] to damage Target[(Player number of (Owner of (Target unit of ability being cast)))], dealing 50.00 damage of attack type Spells and damage type Normal
          • -------- RemoveLoc? --------
          • Custom script: call RemoveLocation (What do i write here?)
          • Custom script: call RemoveLocation (What do i write here?)
      • Unit - Make Caster[(Player number of (Owner of (Triggering unit)))] Vulnerable
      • Unit - Unpause Caster[(Player number of (Owner of (Triggering unit)))]
      • Animation - Reset Caster[(Player number of (Owner of (Triggering unit)))]'s animation
      • Animation - Change Caster[(Player number of (Owner of (Triggering unit)))]'s animation speed to 100.00% of its original speed
I'm really noob at this D:
 
Level 6
Joined
Dec 28, 2007
Messages
178
yes you need a new variable for every new effect, and ..hmm... there're some variable you set different way from the 1st set variable (i mean: if you set the 1st somehow like that: set var. - var.[player number(of owner(of *for example* casting unit))] then set the other variables var.[player number(of owner(of casting unit))] no matter what kind of variable is it: its only for saving them in the right arrays)

so about the locations:
if you use global locations with array[12] then you can remove them with custom scripts:
call RemoveLocation (udg_location[GetPlayerId(GetOwner(GetCaster*ifsavedwithcaster*())])

or use local locations, here're some great tutorial for it:
http://www.hiveworkshop.com/forums/f279/multi-instancible-gui-spell-making-34393/
but dont forget to declear locals in loops and not outside of loops or else it wont work
 
Status
Not open for further replies.
Top