• 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] Can this be MUI?

Status
Not open for further replies.
Level 4
Joined
Aug 20, 2004
Messages
65
Okay, so I made a missile launcher system that uses the Elune's Arrow skill from dota (a GUI version made by Netherdrake) that makes a missile launcher. The launcher has a skill that, when use, makes a dummy unit that instantly casts Elunes arrow directly in-front of it. It works perfectly, except when there are 2 or more of the launchers. When they cast the spell simultaneously, only one fires and the other missile projectiles just stand there forever. This is obviously due to a non-MUI trigger, and as I have no knowledge in such matters, I come to you guys. Here are the triggers

  • Launch Casting
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Launch Missle
    • Actions
      • Set Temp_Point = (Position of (Casting unit))
      • Unit - Create 1 DaggerCaster for (Owner of (Casting unit)) at Temp_Point facing (Facing of (Casting unit)) degrees
      • Unit - Add Soyuz Missle to (Last created unit)
      • Unit - Set level of Soyuz Missle for (Last created unit) to (Level of Launch Missle for (Casting unit))
      • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm ((Position of (Last created unit)) offset by 180.00 towards (Facing of (Triggering unit)) degrees)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Add a 0.50 second Generic expiration timer to (Casting unit)
      • Custom script: call RemoveLocation (udg_Temp_Point)
  • Elune Arrow
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Soyuz Missle
    • Actions
      • Set EA_Timer = 0.50
      • Set EA_Caster = (Triggering unit)
      • Set EA_Caster_Loc = (Position of EA_Caster)
      • Unit - Make EA_Caster face EA_Point over 0.01 seconds
      • Set EA_Point = (Target point of ability being cast)
      • Unit - Create 1 Soyuz Missle for (Owner of EA_Caster) at EA_Caster_Loc facing EA_Point
      • Set EA_Dummy = (Last created unit)
      • Set EA_Dummy_Loc = (Position of EA_Dummy)
      • Set EA_Face_Arrow = (Facing of EA_Dummy)
      • Trigger - Turn on Elune Arrow Action <gen>
      • Wait until ((EA_Timer Equal to 3.00) or ((Number of units in EA_Group) Equal to 1)), checking every 0.10 seconds
      • Unit - Create 1 Soyuz Missle for (Owner of EA_Caster) at EA_Picked_Loc facing Default building facing degrees
      • Unit - Add Elune's Arrow Stun Dummy to (Last created unit)
      • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt EA_Picked
      • Trigger - Turn off Elune Arrow Action <gen>
      • Wait EA_Timer seconds
      • Unit - Remove Stunned (Pause) buff from EA_Picked
      • Unit Group - Remove all units from EA_Group
      • Custom script: call RemoveLocation (udg_EA_Picked_Loc)
      • Custom script: call RemoveLocation (udg_EA_Caster_Loc)
      • Custom script: call RemoveLocation (udg_EA_Dummy_Loc)
  • Elune Arrow Action
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Set EA_Timer = (EA_Timer + 0.05)
      • Set EA_Dummy_Loc = (Position of EA_Dummy)
      • Set EA_Offset = (EA_Dummy_Loc offset by 50.00 towards EA_Face_Arrow degrees)
      • Unit - Move EA_Dummy instantly to EA_Offset, facing EA_Face_Arrow degrees
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 110.00 of EA_Dummy_Loc matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of EA_Caster)) Equal to True)))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is in EA_Group) Equal to False
            • Then - Actions
              • Set EA_Picked = (Picked unit)
              • Set EA_Picked_Loc = (Position of EA_Picked)
              • Unit Group - Add EA_Picked to EA_Group
              • Special Effect - Create a special effect attached to the chest of EA_Picked using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Cause EA_Caster to damage EA_Picked, dealing (90.00 + (20.00 x (Real((Level of Soyuz Missle for EA_Caster))))) damage of attack type Spells and damage type Universal
              • Unit - Remove EA_Dummy from the game
              • Trigger - Turn off (This trigger)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • EA_Timer Equal to 3.00
        • Then - Actions
          • Special Effect - Create a special effect at EA_Dummy_Loc using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Remove EA_Dummy from the game
          • Trigger - Turn off (This trigger)
        • Else - Actions
      • Custom script: call RemoveLocation (udg_EA_Offset)
      • Custom script: call RemoveLocation (udg_EA_Dummy_Loc)
Also, the missiles will sometimes stay around after they hit and stun the targets.
 
Level 4
Joined
Nov 18, 2007
Messages
79
Unfortunately if you wish to make MUI triggers the best course of action would be to learn JASS, unless your spell involves no waits. This is not the case.
 
Level 4
Joined
Nov 18, 2007
Messages
79
Well every spell can be done with harrays/tons of variables, but not every spell can be MUI without JASS. No matter how many billions of variables you put into the GUI you can never make your spell truly MUI. You can imitate it, but it will never be MUI without JASS. The unfortunate truth.
 
Level 4
Joined
Nov 18, 2007
Messages
79
GhostWolf, note I said "your spell". I was saying that his spell cannot be MUI. However, as long as you don't use globals and/or waits in your spell it can be MUI in GUI.

And the essence of a MUI spell is that it can run an infinite number of instances and not mess up. Even with using tons of variables/triggers you will eventually reach the limit and run out of triggers to run the instances.
 
Level 4
Joined
Nov 18, 2007
Messages
79
I don't quite understand how harrays work, never used them before, but if I'm thinking this the right way, then I see where you're trying to go, and yeah, that'll work too. :wgrin:
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Harrays are pretty much like using a lot of variables but instead of that its all in 1 variable.

For example you could use 5 unit variables to assign 5 units, and you could use a unit[1] variable, unit[2] variable ETC. and it would just take you one variable.

I don't think there is anything that can't be MUI in GUI if it can be MUI in JASS, its just more work for us :wsad:
 
Level 5
Joined
Aug 16, 2007
Messages
149
arrays

Erm... Guys when u say 'harrays' don't u mean 'arrays'? and anyway heres an example of a trigger using GUI and arrays:
  • Untitled Trigger 001
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Some_Variable[1] = Some_Unit
      • Set Some_Variable[2] = Some_Unit
      • Set Some_Variable[3] = Some_Unit
      • Set Some_Variable[4] = Some_Unit
      • Set Some_Variable[5] = Some_Unit
      • Set Some_Variable[6] = Some_Unit
      • Set Some_Variable[7] = Some_Unit
      • Set Some_Variable[8] = Some_Unit
      • Set Some_Variable[9] = Some_Unit
      • Set Some_Variable[10] = Some_Unit
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Unit - DoSomethingTo Some_Variable[(Integer A)]
(the number inside [] is the array index, Some_Variable would have the array checkbox ticked)hope this helps, but arrays only work for spells that need to be instanced once per player or per unit(unit numbers need to be limited) and cannot make a spell fully MUI as like Draemiel said:
Well every spell can be done with harrays/tons of variables, but not every spell can be MUI without JASS. No matter how many billions of variables you put into the GUI you can never make your spell truly MUI. You can imitate it, but it will never be MUI without JASS. The unfortunate truth.
I suggest you learn JASS. I'm just getting the hang of now: after only about 3 days. It's not that hard, after all if you use an editor like JASScraft, everything's there for you anyway.
 
Level 9
Joined
Jun 26, 2005
Messages
511
nah you can do some spell in GUI without jass, i tried doing a spell that takes 182 location arrays and 90 unit arrays, total about 300 actions but the trigger was slowing down, instead of casting all at the same time, it cast about 20units per .01second.
 
Status
Not open for further replies.
Top