• 🏆 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] Couple Mapping Questions

Status
Not open for further replies.
Level 5
Joined
Jul 18, 2007
Messages
110
-Is the only way to remove an item from a shop after use, vie trigger?
-How do you remove the number "1" indentation on the bottom right hand corner of the icon from the ability being sold in my shop?
-I'm trying to pick multiple types of units to either kill or move, but I've tried and AND or and both haven't worked =/.
  • Beacon of Deception Red
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (BeaconofDeception[1] is alive) Equal to True
    • Actions
      • Set temp_group = (Units in (Playable map area)(((Unit-type of (Picked unit)) Equal to |c000000ffWar Hawk) and (((Unit-type of (Picked unit)) Equal to |cFF333333Skittering Horror) and (((Unit-type of (Picked unit)) Equal to |c00800080Dark Elf Archer) and (((Unit-type of (Picke
      • Unit Group - Order temp_group to Move To (Center of Center <gen>)
      • Custom script: call DestroyGroup (udg_temp_group)
  • Death Shroud Red
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (DeathShroud[1] is alive) Equal to True
    • Actions
      • Set temp_group = (Units in (Playable map area)(((Unit-type of (Matching unit)) Equal to |c00800080Dark Elf Archer) and (((Unit-type of (Matching unit)) Equal to |c00800080Corrupted Ancient) and (((Unit-type of (Matching unit)) Equal to |c00800080Vile Corruptor) and (((Unit-ty
      • Unit Group - Pick every unit in temp_group and do (Unit - Kill (Picked unit))
      • Custom script: call DestroyGroup (udg_temp_group)
That's an example of the two. And on that note, I'm also wondering how I would be able to only have it kill one of those units at a time for the latter, killing one. And I need that same method to apply to another one, which takes control of units (preferrably one at a time) in your base:
  • Web of Corruption Red
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (WebofCorruption[1] is alive) Equal to True
    • Actions
      • Set temp_group = (Units in Red Base <gen>(((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True))
      • Unit Group - Pick every unit in temp_group and do (For each (Integer A) from 1 to 1000000000, do (Unit - Change ownership of (Picked unit) to Player 1 (Red) and Change color))
      • Custom script: call DestroyGroup (udg_temp_group)
-Lastly and most importantly, again on the note of picking a "unit type of triggering unit:"
  • Mana Draw
    • Events
      • Unit - A unit enters Mana Draw <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to |cffffcc00Slave
    • Actions
      • Game - Display to (Owner of (Triggering unit)), at offset (0.00, 0.00) the text: |c00d9d9ffYou cast ...
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is owned by Player 1 (Red)) Equal to True
          • ((Owner of (Triggering unit)) Current gold) Greater than or equal to 5000
          • (Number of units in (Units in Red Spawn <gen>((Unit-type of (Matching unit)) Equal to |c00ff0000Orc Raider))) Equal to 10
        • Then - Actions
          • Set temp_group = (Units in Red Spawn <gen>((Number of units in (Units in Red Spawn <gen>((Unit-type of (Matching unit)) Equal to |c00ff0000Orc Raider))) Equal to 10))
          • Unit Group - Pick every unit in temp_group and do (Actions)
            • Loop - Actions
              • Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) + 4000)
              • Unit - Kill (Matching unit)
        • Else - Actions
          • Do nothing
      • Set temp_point = (Center of Mana Draw Finish <gen>)
      • Unit - Move (Triggering unit) instantly to temp_point
      • Custom script: call RemoveLocation (udg_temp_point)
Any idea why this isn't killing the unit? It says it casts it, but does nothing. And I specify the unit and everything, dunno. I didn't have the set temp_group thing in there before, but I tried to make a loop to see if that would fix it, but it didn't do anything.
 
Level 4
Joined
Mar 14, 2009
Messages
98
In beacon of deception, you're using "picked unit" wrong. It should be "matching unit". Also, I doubt anything can be both a War Hawk and a Skittering Terror at the same time. Use the or condition, not the and one.

The second note also applies to death shroud.

In web of corruption, you're changing each unit's owner to red a billion times. Warcraft automatically stops after a certain number of loops. If there are like 10 units, you'd be changing owners 10 billion times. Get rid of the for loop.

In mana draw, you should kill "picked unit" not "matching unit.

Tell me if I missed something.
 
Level 5
Joined
Jul 18, 2007
Messages
110
Sweet thanks a lot man (especially for Mana Draw). Like I eluded to in the thread, that actually was matching unit before, and it didn't work. And I was confused with both and or or since neither worked first, but I got em all to work now, thanks. Found a solution for the one at a time thing.

Also, the item questions?
 
Level 5
Joined
Jul 18, 2007
Messages
110
Eh... nvm, few aren't working.

Beacon doesn't seem to be working properly:

  • Beacon of Deception Red
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (BeaconofDeception[1] is alive) Equal to True
    • Actions
      • Set temp_group = (Units in (Playable map area)(((Unit-type of (Matching unit)) Equal to |c00800080Dark Elf Archer) or (((Unit-type of (Matching unit)) Equal to |c00800080Dark Elf Swordsman) or (((Unit-type of (Matching unit)) Equal to |cFF333333Ghoul) or (((Unit-type of (Matc
      • Unit Group - Order temp_group to Move To (Center of Center <gen>)
      • Custom script: call DestroyGroup (udg_temp_group)
and Mana Draw still doesn't work:
  • Mana Draw
    • Events
      • Unit - A unit enters Mana Draw <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to |cffffcc00Slave
    • Actions
      • Game - Display to (Owner of (Triggering unit)), at offset (0.00, 0.00) the text: |c00d9d9ffYou cast ...
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is owned by Player 1 (Red)) Equal to True
          • ((Owner of (Triggering unit)) Current gold) Greater than or equal to 5000
          • (Number of units in (Units in Red Spawn <gen>((Unit-type of (Matching unit)) Equal to |c00ff0000Orc Raider))) Equal to 10
        • Then - Actions
          • Set temp_group = (Units in Red Spawn <gen>((Number of units in (Units in Red Spawn <gen>((Unit-type of (Matching unit)) Equal to |c00ff0000Orc Raider))) Equal to 10))
          • Unit Group - Pick every unit in temp_group and do (Actions)
            • Loop - Actions
              • Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) + 4000)
              • Unit - Kill (Picked unit)
        • Else - Actions
          • Do nothing
          • Set temp_point = (Center of Mana Draw Finish <gen>)
      • Unit - Move (Triggering unit) instantly to temp_point
      • Custom script: call RemoveLocation (udg_temp_point)
I'd rather the "temp_group" just be removed, since I don't want it to say "cast mana draw" if there isn't enough units there. But I tried just keeping the condition and using matched unit, but it didn't work.

EDIT:
  • Forgot to add: Replicate
    • Events
      • Unit - A unit enters Replicate <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to |cffffcc00Slave
      • ((Owner of (Triggering unit)) Current gold) Greater than or equal to 9000
    • Actions
      • Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) - 9000)
      • Game - Display to (Owner of (Triggering unit)), at offset (0.00, 0.00) the text: |c00d9d9ffYou cast ...
      • Dialog - Create a dialog button for DialogGameMode labelled |c00ff0000Red Mage
      • Set ButtonsGameMode[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogGameMode labelled |c00800080Purple Ma...
      • Set ButtonsGameMode[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogGameMode labelled |c00000000Black Mag...
      • Set ButtonsGameMode[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogGameMode labelled |c000000ffBlue Mage
      • Set ButtonsGameMode[4] = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogGameMode labelled |c00ffffffWhite Mag...
      • Set ButtonsGameMode[5] = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogGameMode labelled |c0000ff00Green Mag...
      • Set ButtonsGameMode[6] = (Last created dialog Button)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is owned by Player 1 (Red)) Equal to True
        • Then - Actions
          • Dialog - Show DialogGameMode for Player 1 (Red)
          • Trigger - Turn on Replicate Units Red <gen>
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is owned by Player 4 (Purple)) Equal to True
        • Then - Actions
          • Dialog - Show DialogGameMode for Player 4 (Purple)
          • Trigger - Turn on Replicate Units Purple <gen>
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is owned by Player 12 (Brown)) Equal to True
        • Then - Actions
          • Dialog - Show DialogGameMode for Player 12 (Brown)
          • Trigger - Turn on Replicate Units Black <gen>
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is owned by Player 2 (Blue)) Equal to True
        • Then - Actions
          • Dialog - Show DialogGameMode for Player 2 (Blue)
          • Trigger - Turn on Replicate Units Blue <gen>
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is owned by Player 9 (Gray)) Equal to True
        • Then - Actions
          • Dialog - Show DialogGameMode for Player 9 (Gray)
          • Trigger - Turn on Replicate Units White <gen>
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is owned by Player 7 (Green)) Equal to True
        • Then - Actions
          • Dialog - Show DialogGameMode for Player 7 (Green)
          • Trigger - Turn on Replicate Units Green <gen>
        • Else - Actions
          • Do nothing
      • Set temp_point = (Center of Replicate Finish <gen>)
      • Unit - Move (Triggering unit) instantly to temp_point
      • Custom script: call RemoveLocation (udg_temp_point)
      • Trigger - Turn on Clone Units <gen>
For this one, the dialogs keep stacking every time the unit reenters the rect. How to get rid of em after the first use?

  • Divine Protection
    • Events
      • Unit - A unit enters Divine Protection <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to |cffffcc00Slave
      • ((Owner of (Triggering unit)) Current gold) Greater than or equal to 18000
    • Actions
      • Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) - 18000)
      • Game - Display to (Owner of (Triggering unit)), at offset (0.00, 0.00) the text: |c00d9d9ffYou cast ...
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is owned by Player 1 (Red)) Equal to True
        • Then - Actions
          • Unit Group - Pick every unit in temp_group and do (Actions)
            • Loop - Actions
            • Unit - Make (Picked unit) Invulnerable
            • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\DivineShield\DivineShieldTarget.mdl
            • Wait 15.00 seconds
            • Special Effect - Destroy (Last created special effect)
            • Unit - Make (Picked unit) Vulnerable
          • Custom script: call DestroyGroup (udg_temp_group)
        • Else - Actions
          • Do nothing
      • Set temp_point = (Center of Divine Protection Finish <gen>)
      • Unit - Move (Triggering unit) instantly to temp_point
      • Custom script: call RemoveLocation (udg_temp_point)
This seems to keep messing up as well, it doesn't take the invuln off for some reason =/. I tried changing the "Unit - Make (Picked unit) Vulnerable" to that, from Unit Group - Pick every unit in temp_group and do (Unit - Make (Picked unit) Vulnerable) before.

  • Enhancement
    • Events
      • Unit - A unit enters Enhancement <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to |cffffcc00Slave
      • ((Owner of (Triggering unit)) Current gold) Greater than or equal to 6000
    • Actions
      • Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) - 6000)
      • Game - Display to (Owner of (Triggering unit)), at offset (0.00, 0.00) the text: |c00d9d9ffYou cast ...
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is owned by Player 1 (Red)) Equal to True
        • Then - Actions
          • Set temp_group = (Units in (Playable map area)(((Matching unit) is owned by Player 1 (Red)) Equal to True))
          • Unit Group - Pick every unit in temp_group and do (Actions)
            • Loop - Actions
          • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
          • Unit - Add Enchantment (Damage) to (Picked unit)
          • Unit - Add Enchantment (Armor) to (Picked unit)
          • Wait 15.00 seconds
          • Special Effect - Destroy (Last created special effect)
          • Unit - Remove Enchantment (Damage) to (Picked unit)
          • Unit - Remove Enchantment (Armor) to (Picked unit)
          • Custom script: call DestroyGroup (udg_temp_group)
        • Else - Actions
          • Do nothing
      • Set temp_point = (Center of Enhancement Finish <gen>)
      • Unit - Move (Triggering unit) instantly to temp_point
      • Custom script: call RemoveLocation (udg_temp_point)
Same problem with this one, still not removing after 15 seconds.

FYI: The awkwardness of the loops is just a shitty pastejob.
 
Level 4
Joined
Mar 14, 2009
Messages
98
For Beacon Of Deception: Have you set BeaconofDeception[1] to the proper unit? If you don't then there's no unit to be checked if it's alive.

For Mana Draw: Umm...I actually got confused there.

Try getting rid of the "equal to 10" in set Temp_Group = blah blah.

For Replicate:
Get a boolean array or something and set it to true if a certain player enters the rect. If the boolean is true, then don't show the dialog to him. Something like that.

For that invulnerable thing:
I don't know. Try putting the wait after the loop, then making a new loop to get rid of the invulnerable and the special effect. Destroy the group after the second loop.

For the enhancement thing:
Same as above. It might not work though.
 
Level 5
Joined
Jul 18, 2007
Messages
110
Yes, that concept works for every other trigger.

I tried getting rid of that, like I said in the post, lol.

Hm..? Isn't that already in the condition.

Tried it.
 
Level 4
Joined
Mar 14, 2009
Messages
98
  • Set temp_group = (Units in Red Spawn <gen>((Number of units in (Units in Red Spawn <gen>((Unit-type of (Matching unit)) Equal to |c00ff0000Orc Raider))) Equal to 10))
That is an integer comparison not a unit-type comparison. It's a lot like saying "Group all units in region matching (1+1 equals 2)"

Get rid of the integer comparison, keep the unit-type comparison. The condition states that it will only work if there are exactly 10 orc raiders anyway.
 
Level 5
Joined
Jul 18, 2007
Messages
110
Still didn't work.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Triggering unit) is owned by Player 1 (Red)) Equal to True
      • ((Owner of (Triggering unit)) Current gold) Greater than or equal to 5000
      • (Number of units in (Units in Red Spawn <gen>)) Equal to 10
    • Then - Actions
      • Set temp_group = (Units in Red Spawn <gen>((Unit-type of (Matching unit)) Equal to |c00ff0000Orc Raider))
      • Unit Group - Pick every unit in temp_group and do (Actions)
        • Loop - Actions
          • Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) + 4000)
          • Unit - Kill (Picked unit)
    • Else - Actions
      • Do nothing
Like that..?
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
For the beacon thing... as I already said. I don't like the damn matching thing:

Pick every unit in (playalbe map area) and do actions:
If(picked unit type = ...) or (picked unit type = ...) ...
Then: Add picked unit to temp_group

(endloop)
PIck every unit in temp_group and do action:
Unit - order to go to center of center
 
Level 5
Joined
Jul 18, 2007
Messages
110
Zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.

  • Beacon of Deception Red
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (BeaconofDeception[1] is alive) Equal to True
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Unit-type of (Picked unit)) Equal to |c00ff0000Orc Raider) or (((Unit-type of (Picked unit)) Equal to |c00ff0000Orc Impaler) or (((Unit-type of (Picked unit)) Equal to |c00800080Dark Elf Archer) or (((Unit-type of (Picked unit)) Equal to |c00800080Dark Elf Swordsman) or (((Unit-type of (Picked unit)) Equal to |cFF333333
            • Then - Actions
              • Unit Group - Add (Picked unit) to temp_group
            • Else - Actions
              • Do nothing
      • Unit Group - Pick every unit in temp_group and do (Unit - Order (Picked unit) to Move To (Center of Center <gen>))
      • Custom script: call DestroyGroup (udg_temp_group)
Btw, shouldn't this prevent a player from having more than one of the artifacts (buildings)?
  • ((Artifact Red <gen> contains ShrineofThirst[1]) Equal to False) or (((Artifact Red <gen> contains BeaconofDeception[1]) Equal to False) or (((Artifact Red <gen> contains EMPOrb[1]) Equal to False) or (((Artifact Red <gen> contains WebofCorruption[1]) Equal to False) or (((Artifact Red <gen> contains TreeofEvergreen[1]) Equal
I had it "and" before, but it only worked for once race.
 
Level 9
Joined
Nov 4, 2007
Messages
931
Ah, fun this looks challenging lets see... you have plenty of responses but I'm a bit confused as to which ones are fixed, if any, tell me which ones are having trouble with and I'll be able to help.
 
Level 9
Joined
Nov 4, 2007
Messages
931
OK:
  • Mana Draw
  • Events
  • Unit - A unit enters Mana Draw <gen>
  • Conditions
  • (Unit-type of (Triggering unit)) Equal to |cffffcc00Slave
  • Actions
  • Game - Display to (Owner of (Triggering unit)), at offset (0.00, 0.00) the text: |c00d9d9ffYou cast ...
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • ((Triggering unit) is owned by Player 1 (Red)) Equal to True
  • ((Owner of (Triggering unit)) Current gold) Greater than or equal to 5000
  • (Number of units in (Units in Red Spawn <gen>((Unit-type of (Matching unit)) Equal to |c00ff0000Orc Raider))) Equal to 10
  • Then - Actions
  • Set temp_group = (Units in Red Spawn <gen>((Number of units in (Units in Red Spawn <gen>((Unit-type of (Matching unit)) Equal to |c00ff0000Orc Raider))) Equal to 10))
  • Unit Group - Pick every unit in temp_group and do (Actions)
  • Loop - Actions
  • Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) + 4000)
  • Unit - Kill (Picked unit)
  • Else - Actions
  • Do nothing
  • Set temp_point = (Center of Mana Draw Finish <gen>)
  • Unit - Move (Triggering unit) instantly to temp_point
  • Custom script: call RemoveLocation (udg_temp_point)
This ofcourse is your mana draw, ofcourse, this is how I think it should look:
  • Game - Display to (Owner of (Entering unit)), at offset (0.00, 0.00) the text: |c00d9d9ffYou cast ...
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • ((Entering unit) is owned by Player 1 (Red)) Equal to True
  • ((Owner of (Entering unit)) Current gold) Greater than or equal to 5000
  • (Number of units in (Units in Red Spawn <gen>((Unit-type of (Matching unit)) Equal to |c00ff0000Orc Raider))) Equal to 10
  • Then - Actions
  • Set temp_group = (Units in Red Spawn <gen>((Number of units in (Units in Red Spawn <gen>((Unit-type of (Matching unit)) Equal to |c00ff0000Orc Raider))))
  • Unit Group - Pick every unit in temp_group and do (Actions)
  • Loop - Actions
  • Player - Set (Owner of (Entering unit)) Current gold to (((Owner of (Entering unit)) Current gold) + 4000)
  • Unit - Kill (Picked unit)
  • Unit Group - Removed Picked Unit From temp_group
  • Else - Actions
  • Do nothing
  • Set temp_point = (Center of Mana Draw Finish <gen>)
  • Unit - Move (Entering unit) instantly to temp_point
  • Custom script: call RemoveLocation (udg_temp_point)
Try it like that and see how it goes.
 
Level 5
Joined
Jul 18, 2007
Messages
110
Btw, the trigger casted fine and everything worked, except the killing/+ mana. Also, I had the tempgroup action fixed as well (omitted = to 10).

And no, it didn't work.
 
Level 9
Joined
Nov 4, 2007
Messages
931
Ah I see, OK onto a different one then
  • Enhancement
  • Events
  • Unit - A unit enters Enhancement <gen>
  • Conditions
  • (Unit-type of (Triggering unit)) Equal to |cffffcc00Slave
  • ((Owner of (Triggering unit)) Current gold) Greater than or equal to 6000
  • Actions
  • Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) - 6000)
  • Game - Display to (Owner of (Triggering unit)), at offset (0.00, 0.00) the text: |c00d9d9ffYou cast ...
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • ((Triggering unit) is owned by Player 1 (Red)) Equal to True
  • Then - Actions
  • Set temp_group = (Units in (Playable map area)(((Matching unit) is owned by Player 1 (Red)) Equal to True))
  • Unit Group - Pick every unit in temp_group and do (Actions)
  • Loop - Actions
  • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
  • Unit - Add Enchantment (Damage) to (Picked unit)
  • Unit - Add Enchantment (Armor) to (Picked unit)
  • Wait 15.00 seconds
  • Special Effect - Destroy (Last created special effect)
  • Unit - Remove Enchantment (Damage) to (Picked unit)
  • Unit - Remove Enchantment (Armor) to (Picked unit)
  • Custom script: call DestroyGroup (udg_temp_group)
  • Else - Actions
  • Do nothing
  • Set temp_point = (Center of Enhancement Finish <gen>)
  • Unit - Move (Triggering unit) instantly to temp_point
  • Custom script: call RemoveLocation (udg_temp_point)
The special effects wont remove for this one because wait timers can sometimes interfere in loop triggers, how I would try to solve this would be creating 2 integers, a unit array, and a special effect array variable:
  • Set MyFirstInteger = 0
  • Unit Group - Pick every unit in temp_group and do (Actions)
  • Loop - Actions
  • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
  • Set SFX[MyInteger] = Last Created Special Effect
  • Unit - Add Enchantment (Damage) to (Picked unit)
  • Unit - Add Enchantment (Armor) to (Picked unit)
  • Set UnitArray[MyInteger]
  • Set MyInteger = MyInteger + 1
  • [AFTER UNIT GROUP LOOP)
  • Custom script: call DestroyGroup (udg_temp_group)
  • Wait 15.00 seconds
  • Set MyInteger#2 = MyInteger
  • For Each Integer A loop 1 through MyInteger and do actions:
  • Set MyInteger = MyInteger - 1
  • Unit - Remove Enchantment (Damage) to (UnitArray[MyInteger])
  • Unit - Remove Enchantment (Armor) to (UnitArray[MyInteger])
  • Special Effect - Destroy Effect (SFX[MyInteger])
  • EndLoop
  • For Each Integer B loop 1 through MyInteger#2 and do actions:
  • Set MyInteger#2 = MyInteger#2 - 1
  • Custom Script: call Set udg_SFX[udg_MyInteger#2) = null
  • Custom Script: call Set udg_UnitArray[udg_MyInteger#2) = null
If this wont work you may have to incorporate locals at the beginning of your trigger which would look a lil like this:
  • Enhancement
  • Events
  • Unit - A unit enters Enhancement <gen>
  • Conditions
  • (Unit-type of (Triggering unit)) Equal to |cffffcc00Slave
  • ((Owner of (Triggering unit)) Current gold) Greater than or equal to 6000
  • Actions
  • Custom Script: local integer MyInteger
  • Custom Script: local integer MyInteger#2
  • Custom Script: local unit array UnitArray
  • Custom Script: local effect array SFX
  • ....
  • Unit Group - Pick every unit in temp_group and do (Actions)
  • Loop - Actions
  • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
  • Custom Script: Set SFX[MyInteger] = GetLastCreatedEffectBJ
  • Unit - Add Enchantment (Damage) to (Picked unit)
  • Unit - Add Enchantment (Armor) to (Picked unit)
  • Custom Script: set UnitArray[MyInteger] = GetEnumUnit()
  • Custom Script: set MyInteger = MyInteger + 1
  • [AFTER UNIT GROUP LOOP)
  • Custom script: call DestroyGroup (udg_temp_group)
  • Wait 15.00 seconds
  • Custom Script: set MyInteger#2 = MyInteger
  • Custom Script: set bj_forLoopAIndex = 1
  • Custom Script: set bj_forLoopAIndexEnd = MyInteger
  • Custom Script: loop
  • Custom Script: exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
  • Custom Script: set MyInteger = MyInteger - 1
  • Custom Script: call UnitRemoveAbilityBJ( 'RAW Code of Damage', UnitArray[MyInteger] )
  • Custom Script: call UnitRemoveAbilityBJ( 'RAW Code of Armor', UnitArray[MyInteger] )
  • Custom Script: call DestroyEffectBJ( SFX[MyInteger] )
  • Custom Script: endloop
  • Custom Script: set bj_forLoopBIndex = 1
  • Custom Script: set bj_forLoopBIndexEnd = MyInteger#2
  • Custom Script: loop
  • Custom Script: exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
  • Custom Script: set MyInteger#2 = MyInteger#2 - 1
  • Custom Script: call Set SFX[MyInteger#2) = null
  • Custom Script: call Set UnitArray[MyInteger#2) = null
  • Custom Script: endloop
Complicated enough? If you can't get it to work that way you may have to convert your entire trigger to custom script.
 
Level 5
Joined
Jul 18, 2007
Messages
110
Do you got MSN or AIM or something? If you already did all that, might just be quicker to send me it or me send you the map and try it, lol =p. Also, I do think maybe doing it in JASS would be easier, although I'm not sure where to begin. I did try using two temp groups and having the wait in between the loops, btw, still didn't work. I guess I'll try this if you don't send though.
 
Level 9
Joined
Nov 4, 2007
Messages
931
I have use windows live and yahoo messenger, MSN jus doesn't open on my computer for reasons beyond me, and I didn't actually do these in a trigger already, I'd never go through the suffering of tryin to make a trigger 1/2 GUI and 1/2 custom script
 
Level 9
Joined
Nov 4, 2007
Messages
931
I am not particularly familiar with the dialogue button so I avoided that, but feel free to send them, might be easier to figure out whats wrong and help.
 
Status
Not open for further replies.
Top