• 🏆 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] Making this GUI Black Hole spell MUI

Status
Not open for further replies.
Level 2
Joined
Oct 15, 2008
Messages
17
Hi i'm new to mapping and am having trouble with getting this spell to be MUI.

I've imported a GUI unit indexer by Bribe
http://www.hiveworkshop.com/forums/spells-569/gui-unit-indexer-1-0-1-0-a-197329/

i followed the steps and added the system to my map.

i didn't edit anything, i.e, Unit Indexer trig and the jass script located on map name.

i tried setting custom integer variable to triggering units custom variable to my spell

and when i try to multi cast the spell with 2 different units with 2 different custom values, it doesn't work. The last casted spell overwrites the first one.

could someone help me fix this?

i have attached the map to this post.

thanks =)


also here's the triggering for my spell:
  • Black Hole
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Esoteric Entraptment
    • Actions
      • Set vCustom = (Custom value of (Triggering unit))
      • Set vCaster[vCustom] = (Triggering unit)
      • Special Effect - Create a special effect attached to the Attach Point - Weapon of vCaster[vCustom] using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
      • Set vEffect[vCustom] = (Last created special effect)
      • Special Effect - Destroy vEffect[vCustom]
      • Animation - Play vCaster[vCustom]'s (stand + first) animation
      • Set vCasterLoc[vCustom] = (Position of vCaster[vCustom])
      • Set vTargetLoc[vCustom] = (vCasterLoc[vCustom] offset by 600.00 towards (Facing of vCaster[vCustom]) degrees)
      • Unit - Create 1 Black Hole for (Owner of vCaster[vCustom]) at vTargetLoc[vCustom] facing vCasterLoc[vCustom]
      • Set vDummy[vCustom] = (Last created unit)
      • Unit - Add a 5.00 second Water Elemental expiration timer to vDummy[vCustom]
      • Set vGroup[vCustom] = (Units within 800.00 of vCasterLoc[vCustom] matching ((((Matching unit) is Magic Immune) Equal to (==) False) and ((((Matching unit) belongs to an enemy of (Owner of vCaster[vCustom])) Equal to (==) True) and (((Matching unit) is alive) Equal to (==) True))))
      • Trigger - Turn on Black Hole Pull <gen>
      • Trigger - Turn on Black Hole Dies <gen>
  • Black Hole Pull
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Set vGroup[vCustom] = (Units within 800.00 of vCasterLoc[vCustom] matching ((((Matching unit) is Magic Immune) Equal to (==) False) and ((((Matching unit) belongs to an enemy of (Owner of vCaster[vCustom])) Equal to (==) True) and (((Matching unit) is alive) Equal to (==) True))))
      • Unit Group - Pick every unit in vGroup[vCustom] and do (Actions)
        • Loop - Actions
          • Set vCustom2 = (Custom value of (Picked unit))
          • Set vPicked[vCustom2] = (Picked unit)
          • Unit - Cause vCaster[vCustom] to damage vPicked[vCustom2], dealing 5.00 damage of attack type Spells and damage type Normal
          • Special Effect - Create a special effect attached to the origin of vPicked[vCustom2] using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
          • Set vEffect[vCustom2] = (Last created special effect)
          • Special Effect - Destroy vEffect[vCustom2]
          • Set MagicianPicked[vCustom2] = (Position of vPicked[vCustom2])
          • Unit - Make vPicked[vCustom2] face vCasterLoc[vCustom] over 0.01 seconds
          • Unit - Move vPicked[vCustom2] instantly to (MagicianPicked[vCustom2] offset by 8.00 towards (Facing of vPicked[vCustom2]) degrees)
          • Custom script: call RemoveLocation( udg_MagicianPicked[udg_vCustom2] )
          • Set vPicked[vCustom2] = No unit
          • Custom script: call DestroyGroup( udg_vGroup[udg_vCustom] )
  • Black Hole Dies
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to (==) vDummy[vCustom]
        • Then - Actions
          • Unit - Hide vDummy[vCustom]
          • Custom script: call DestroyGroup( udg_vGroup[udg_vCustom] )
          • Custom script: call RemoveLocation( udg_vTargetLoc[udg_vCustom] )
          • Custom script: call RemoveLocation( udg_vCasterLoc[udg_vCustom] )
          • Set vCaster[vCustom] = No unit
          • Set vDummy[vCustom] = No unit
          • Trigger - Turn off Black Hole Pull <gen>
          • Trigger - Turn off (This trigger)
        • Else - Actions
 

Attachments

  • TestMap.w3x
    63.8 KB · Views: 81
Level 6
Joined
Sep 27, 2008
Messages
258
i would try to help but i am really noob and before i try i have to ask what is MUI just meaning there can be multiple casts of one spell on the map at a time?
 
Level 6
Joined
Sep 27, 2008
Messages
258
It's because you're using the variable vCustom without setting it to the custom value of the unit each time. In your "Black Hole Pull" trigger, for example, you don't set the vCustom value so when you reference it you'll only reference it for the last hero who cast the spell.

that is true
 
Level 2
Joined
Oct 15, 2008
Messages
17
It's because you're using the variable vCustom without setting it to the custom value of the unit each time. In your "Black Hole Pull" trigger, for example, you don't set the vCustom value so when you reference it you'll only reference it for the last hero who cast the spell.

how would i go about doing that?

i tried setting vCustom = custom value of triggering unit in the black hole pull trigger and it didn't work.

sorry i'm really noob at this stuff

and thx very much for helping
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
I'll write you an MUI version of your spell, give me a little bit.

Edit: This is not the whole thing but it should be enough to get you going.

  • Black Hole
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Esoteric Entrapment
    • Actions
      • Set Caster = (Triggering unit)
      • Special Effect - Create a special effect attached to the Attach Point - Weapon of Caster using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Animation - Play Caster's (stand + first) animation
      • Set TempLoc = (Target point of ability being cast)
      • Unit - Create 1 Black Hole for (Triggering player) at TempLoc facing 0.00 degrees
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Set Dummy = (Last created unit)
      • Set vCaster[(Custom value of Dummy)] = Caster
      • Unit - Add a 5.00 second Water Elemental expiration timer to Dummy
      • Unit - Add Dummy to vGroup
      • Trigger - Turn on Black Hole Pull
      • Trigger - Turn on Black Hole Dies
  • Black Hole Pull
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in vGroup and do (Actions)
        • Loop - Actions
          • Set Caster = vCaster[(Custom value of (Picked unit))]
          • Set TempLoc = (Position of (Picked unit))
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within 800 of TempLoc matching ((((Matching unit) is Magic Immune) Equal to (==) False) and ((((Matching unit) belongs to an enemy of (Owner of vCaster[vCustom])) Equal to (==) True) and (((Matching unit) is alive) Equal to (==) True)))) and do (Actions)
            • Loop - Actions
              • Unit - Cause Caster to damage (Picked unit), dealing 3.00 damage of attack type Spells and damage type Normal
              • Special Effect - Create a special effect attached to the origin of vPicked[vCustom2] using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
              • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_TempLoc)
  • Black Hole Dies
    • Events
      • Unit - A unit dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) is in vGroup Equal to True
        • Then - Actions
          • Unit Group - Remove (Triggering unit) from vGroup
          • Unit - Remove (Triggering unit) from the game
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in vGroup) Equal to 0
            • Then - Actions
              • Trigger - Turn off Black Hole Pull <gen>
              • Trigger - Turn off (This trigger)
            • Else - Actions
        • Else - Actions
 
Last edited:
Status
Not open for further replies.
Top