• 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] Why isn't this MUI?

Status
Not open for further replies.
Level 8
Joined
Dec 16, 2007
Messages
252
Okey I made a spell in GUI and is supposed to be MUI, but it isn't.

This it how it works:
When you cast the spell you'll summon a unit and you'll get a new skill.
When you cast the new skill the summoned unit will move to the targeted point by slide triggers and damage all units in its path.
You can order the unit to move to a point how many times you want till the duration is gone.

What happen when two units cast it:
Player A summons unit A
Player B summons unit B
Player A casts the new skill
Both Player A's and Player B's summoned unit moves to the target point Player A ordered.

+rep if someone could make a MUI/JASS version of this spell or find a way to make it MUI in GUI.

Here's the triggers and I'll add the map so you can see how it works. Don't think my description explained enough.
  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Summon Bloodseeker
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Bloodseeker_CV Less than 1000
        • Then - Actions
          • Set Bloodseeker_CV = (Bloodseeker_CV + 1)
        • Else - Actions
          • Set Bloodseeker_CV = 1
      • Set Bloodseeker_Caster[Bloodseeker_CV] = (Triggering unit)
      • Set Bloodseeker_Loc[Bloodseeker_CV] = ((Position of Bloodseeker_Caster[Bloodseeker_CV]) offset by 200.00 towards (Facing of Bloodseeker_Caster[Bloodseeker_CV]) degrees)
      • Unit - Create 1 Cleaver for (Owner of Bloodseeker_Caster[Bloodseeker_CV]) at Bloodseeker_Loc[Bloodseeker_CV] facing (Facing of Bloodseeker_Caster[Bloodseeker_CV]) degrees
      • Unit - Turn collision for (Last created unit) Off
      • Set Bloodseeker_Axe[Bloodseeker_CV] = (Last created unit)
      • Unit - Create 1 Dummy for (Owner of Bloodseeker_Caster[Bloodseeker_CV]) at Bloodseeker_Loc[Bloodseeker_CV] facing (Facing of Bloodseeker_Caster[Bloodseeker_CV]) degrees
      • Unit - Turn collision for (Last created unit) Off
      • Unit - Set the custom value of (Last created unit) to Bloodseeker_CV
      • Unit - Remove Summon Bloodseeker from Bloodseeker_Caster[Bloodseeker_CV]
      • Unit - Add Blood Sacrifice to Bloodseeker_Caster[Bloodseeker_CV]
      • Unit Group - Add (Last created unit) to Bloodseeker_DummyGroup
      • Custom script: call RemoveLocation(udg_Bloodseeker_Loc[udg_Bloodseeker_CV])
  • Order
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blood Sacrifice
    • Actions
      • Unit Group - Pick every unit in Bloodseeker_DummyGroup and do (Actions)
        • Loop - Actions
          • Set Bloodseeker_CV2 = (Custom value of (Picked unit))
          • Set Bloodseeker_DummyLoc[Bloodseeker_CV2] = (Position of Bloodseeker_Axe[Bloodseeker_CV2])
          • Set Bloodseeker_Target[Bloodseeker_CV2] = (Target point of ability being cast)
          • Special Effect - Create a special effect at Bloodseeker_Target[Bloodseeker_CV2] using Abilities\Weapons\HydraliskImpact\HydraliskImpact.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Set life of Bloodseeker_Caster[Bloodseeker_CV2] to ((Life of Bloodseeker_Caster[Bloodseeker_CV2]) - 25.00)
          • Set Bloodseeker_Angle[Bloodseeker_CV2] = (Angle from Bloodseeker_DummyLoc[Bloodseeker_CV2] to Bloodseeker_Target[Bloodseeker_CV2])
          • Custom script: call RemoveLocation(udg_Bloodseeker_Target[udg_Bloodseeker_CV2])
          • Custom script: call RemoveLocation(udg_Bloodseeker_DummyLoc[udg_Bloodseeker_CV2])
          • Unit - Set the custom value of Bloodseeker_Axe[Bloodseeker_CV2] to Bloodseeker_CV2
          • Unit Group - Add Bloodseeker_Axe[Bloodseeker_CV2] to Bloodseeker_DummyGroup2
  • Movement
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
      • (Number of units in Bloodseeker_DummyGroup2) Greater than 0
    • Actions
      • Unit Group - Pick every unit in Bloodseeker_DummyGroup2 and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Bloodseeker_Wait[Bloodseeker_CV3] Greater than or equal to 20.00
            • Then - Actions
              • Unit - Remove Blood Sacrifice from Bloodseeker_Caster[Bloodseeker_CV3]
              • Unit - Add Summon Bloodseeker to Bloodseeker_Caster[Bloodseeker_CV3]
              • Unit Group - Remove (Picked unit) from Bloodseeker_DummyGroup2
              • Unit - Kill (Picked unit)
              • Set Bloodseeker_Wait[Bloodseeker_CV3] = 0.00
              • Custom script: call RemoveLocation(udg_Bloodseeker_AxeMoveLoc[udg_Bloodseeker_CV3])
              • Custom script: call DestroyGroup(udg_Bloodseeker_EnemyGroup)
            • Else - Actions
              • Set Bloodseeker_CV3 = (Custom value of (Picked unit))
              • Set Bloodseeker_Wait[Bloodseeker_CV3] = (Bloodseeker_Wait[Bloodseeker_CV3] + 0.02)
              • Set Bloodseeker_AxeMoveLoc[Bloodseeker_CV3] = ((Position of (Picked unit)) offset by 15.00 towards Bloodseeker_Angle[Bloodseeker_CV3] degrees)
              • Set Bloodseeker_EnemyGroup = (Units within 100.00 of (Position of (Picked unit)) matching (((Unit-type of (Matching unit)) Not equal to Cleaver) and (((Matching unit) is alive) Equal to True)))
              • Unit - Move (Picked unit) instantly to Bloodseeker_AxeMoveLoc[Bloodseeker_CV3], facing Bloodseeker_Angle[Bloodseeker_CV3] degrees
              • Unit Group - Pick every unit in Bloodseeker_EnemyGroup and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) is in Bloodseeker_DamageGroup) Equal to True
                    • Then - Actions
                    • Else - Actions
                      • Unit - Cause Bloodseeker_Axe[Bloodseeker_CV3] to damage (Picked unit), dealing 100.00 damage of attack type Chaos and damage type Normal
                      • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Unit Group - Add (Picked unit) to Bloodseeker_DamageGroup
                      • Unit Group - Remove (Picked unit) from Bloodseeker_EnemyGroup
                      • Custom script: call DestroyGroup(udg_Bloodseeker_EnemyGroup)
              • Unit Group - Pick every unit in Bloodseeker_DamageGroup and do (Actions)
                • Loop - Actions
                  • Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Custom value of (Picked unit)) Greater than or equal to 200
                    • Then - Actions
                      • Unit - Set the custom value of (Picked unit) to 0
                      • Unit Group - Remove (Picked unit) from Bloodseeker_DamageGroup
                    • Else - Actions
 

Attachments

  • SummonBloodseeker.w3x
    43.1 KB · Views: 49
Level 12
Joined
Aug 18, 2006
Messages
1,193
first off, you leak some positions(the Point with Polar Offset actually uses 1 Point to create another, making memory for 2 points instead of 1)

secondly, for some reason, some of the peasants could be damaged when not even close to the current axe. I would say this is becouse only becouse you Kill a unit with a Trigger, doesnt mean the unit disappears. It can still be moved using triggers and the Killed unit is not removed from the Bloodseeker_DummyGroup(1)

thirdly, "What happen when two units cast it:", is that how you want it to work, or is it how it is working right now, and you want it fixxed?
 
Level 8
Joined
Dec 16, 2007
Messages
252
So many bug oO. Hmm I'll try to fix that. Any reason why it's not MUI?

((Position of Bloodseeker_Caster[Bloodseeker_CV]) offset by 200.00 towards (Facing of Bloodseeker_Caster[Bloodseeker_CV]) degrees)

U mean this part leaks? Should I do something like

Set Bloodseeker_CasterLoc = Position of Bloodseeker_Caster[CV]
Bloodseeker_CasterLoc[CV] offset by 200.00 towards (Facing of Bloodseeker_Caster[Bloodseeker_CV]) degrees)?

What happen when two units cast it:
Player A summons unit A
Player B summons unit B
Player A casts the new skill
Both Player A's and Player B's summoned unit moves to the target point Player A ordered.

No no, this is what happens, I want that you can only control your own axe, but now Player A can control Player B's axe too
 
Level 12
Joined
Aug 18, 2006
Messages
1,193
precisely, 1 Point Variable for the (Position of UNIT) and one for the Point with Polar Offset :p

anyhow, this is your problem. You pick All units in the DummyGroups, not the unit that is bound to the caster(the casters cleaver that is)

try adding this to the beginning of the Pick every unit in DummyGroup
  • Blablabla
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Bloodseeker_Caster[(Custom value of (Picked unit))] = (Casting unit)
      • Then - Actions
        • Your actions here
      • Else - Actions
this will make the Pick every unit in UnitGroup pick only the Cleaver of the casting unit

oh, and the Set Bloodseeker_CV3 = (Custom value of (Picked unit)) should be before the If / Then / Else in that trigger, since the Then Actions use it aswell
 
Level 17
Joined
May 6, 2008
Messages
1,598
Remove the event, then force-run the trigger, something.

Run trigger ignoring condition or checking conditions
 
Level 11
Joined
Apr 6, 2008
Messages
760
em yes

since Custom script: local unit udg_Bloodseeker_Caster dont use the udg_var it create a local var name udg_blahblah and everytime u use set Bloodseeker_Caster to something u set the local var to it and not the global... (sry for crappy grammar xD)
 
Level 17
Joined
May 6, 2008
Messages
1,598
em yes

since Custom script: local unit udg_Bloodseeker_Caster dont use the udg_var it create a local var name udg_blahblah and everytime u use set Bloodseeker_Caster to something u set the local var to it and not the global... (sry for crappy grammar xD)
Must have understood wrong.

Sorry about that, thought you meant that it was MUI before adding that.
 
Status
Not open for further replies.
Top