• 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] NEED Help

Status
Not open for further replies.
Level 3
Joined
Oct 30, 2009
Messages
24
Here's a rough copy of what i have, I had to replace some things with my own text because it was in Russian. it's suposed to kill a unit stored in a variable [squadvar2] if there's no more units with that costume value *

Every 2.00 seconds of game time
For each (Integer A) from 0 to squadvar, do (Actions)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
(Number of units in (Units in (Playable map area) matching ((Custom value of (Matching unit)) = squadvar))) equals 0
then
unit - Kill squadvar2[(Integer A)] *
else
Do nothing
-----------------------------------------------
need more info? just tell, i just need a fixed scripd ( i do not care about leakes :))

repost

basically i need to remove squadvar2[#] if there is no more units with costume value of # of squadvar2
 
Level 15
Joined
Oct 18, 2008
Messages
1,591
Here's a rough copy of what i have, I had to replace some things with my own text because it was in Russian. it's suposed to kill a unit stored in a variable [squadvar2] if there's no more units with that costume value *

Every 2.00 seconds of game time
For each (Integer A) from 0 to squadvar, do (Actions)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
(Number of units in (Units in (Playable map area) matching ((Custom value of (Matching unit)) = squadvar))) equals 0
then
unit - Kill squadvar2[(Integer A)] *
else
Do nothing
-----------------------------------------------
need more info? just tell, i just need a fixed scripd ( i do not care about leakes :))

repost

basically i need to remove squadvar2[#] if there is no more units with costume value of # of squadvar2

DO YOU EVEN LISTENT TO ME?

Every 2.00 seconds of game time
For each (Integer A) from 0 to squadvar, do (Actions)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
(Number of units in (Units in (Playable map area) matching ((Custom value of (Matching unit)) = squadvar))) equals 1
then
unit - Kill squadvar2[(Integer A)] *
else
Do nothing
 
Level 3
Joined
Oct 30, 2009
Messages
24
DO YOU EVEN LISTENT TO ME?

Every 2.00 seconds of game time
For each (Integer A) from 0 to squadvar, do (Actions)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
(Number of units in (Units in (Playable map area) matching ((Custom value of (Matching unit)) = squadvar))) equals 1
then
unit - Kill squadvar2[(Integer A)] *
else
Do nothing

WHATS THE POINT OF SWITCHING FROM 0 TO 1 ?????? it doesn't even make a difference!
 
Level 11
Joined
Aug 6, 2009
Messages
697
you do not get it, I AM NOT TRYING TO KILL ANYONE I THAT GROUP!!!! I AM TRYING TO KILL SQUADVAR2[INTEGER A] WHEN THERES NO ONE IN THE GROUP OF UNITS WITH COSTUME VALUE OF INTEGER A!!!!!!!!!!

Before you go and scream at me for trying to do your trigger that I might have failed,please realise that I have no f**king clue what squadvar is set as or squadvar2 is set as so please tell us before posting a trigger you want us to fix that takes 2 or more triggers please??

  • Events
    • Time - Every 2.00 seconds of game time
  • Conditions
  • Actions
    • For each (Integer A) from 1 to squadvar, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Number of units in (Units in (Playable map area) matching ((Custom value of (Matching unit)) Equal to squadvar))) Less than or equal to 1
          • Then - Actions
            • Unit - Kill squadvar2[(Integer A)]
          • Else - Actions
 
Level 3
Joined
Oct 30, 2009
Messages
24
Before you go and scream at me for trying to do your trigger that I might have failed,please realise that I have no f**king clue what squadvar is set as or squadvar2 is set as so please tell us before posting a trigger you want us to fix that takes 2 or more triggers please??

  • Events
    • Time - Every 2.00 seconds of game time
  • Conditions
  • Actions
    • For each (Integer A) from 1 to squadvar, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Number of units in (Units in (Playable map area) matching ((Custom value of (Matching unit)) Equal to squadvar))) Less than or equal to 1
          • Then - Actions
            • Unit - Kill squadvar2[(Integer A)]
          • Else - Actions

dang it, doesn't work
 
Level 3
Joined
Oct 30, 2009
Messages
24
((Custom value of (Matching unit)) = Integer A))) instead of ((Custom value of (Matching unit)) = squadvar)))
If I am right, and you are trying to kill any unit that is a loner(the only one with a custom value), then this should work. If not, please state what you're trying to achieve more properly.

That IS what I am doing :), but that solution didn't help :(, maybe you can test it in your world editor?
 
Level 11
Joined
Aug 6, 2009
Messages
697
Here's a rough copy of the map with triggers :fp: http://www.mediafire.com/?bpwqrlsfjkth6yo
Alright I already see a big problem,your function mass over somthing that can be done with 6 functions or so.Solution =

  • Events
    • Time - Every 30.00 seconds of game time
  • Conditions
  • Actions
    • For each (Integer A) from 1 to 10, do (Actions)
      • Loop - Actions
        • Unit - Create 1 Militia for Player 8 (Pink) at (Random point in Team2Tower <gen>) facing Default building facing degrees
        • Set UnitSend2 = (Last created unit)
        • Set Point = (Random point in Team1Tower <gen>)
        • Unit - Order UnitSend2 to Patrol To Point
        • Custom script: call RemoveLocation (udg_Point)
Nevermind.
 
Last edited:
Status
Not open for further replies.
Top