• 🏆 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!

Need help with new trigger

Status
Not open for further replies.
Level 8
Joined
Nov 20, 2005
Messages
372
I have a very complicate trigger made.
But the computer doesn't get a unit but walks to the mercancy. Need also help where is the mistake in it.
( like somewhere Integer B instead Integer A )

For each (Integer A) from 1 to 12, do (Actions)
Schleifen - Aktionen
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Bedingungen
Hero_Is_Dead[(Integer A)] Gleich False
Repear_Man[(Integer A)] Gleich Keine Einheit
Is_Going_to_buy_Repear_Man[(Player number of (Player((Integer A))))] Gleich False
((Player((Integer A))) controller) Gleich Computer
((Player((Integer A))) slot status) Gleich Spielt
(Number of units in (Units within 850.00 of (Position of MainConstruction[(Integer A)]) matching ((((Owner of (Matching unit)) is an enemy of (Player((Integer A)))) Gleich True) and (((Matching unit) is alive) Gleich True)))) Gleich 0
((Region centered at (Position of MainConstruction[(Integer A)]) with size (850.00, 850.00)) contains Hero[(Integer A)]) Gleich True
(Leben of MainConstruction[(Integer A)]) Kleiner gleich ((Max. Leben of MainConstruction[(Integer A)]) / 4.00)
((Player((Integer A))) Aktuelles Gold) Größer gleich 75
((Player((Integer A))) Aktuelles Holz) Größer gleich 1
'THEN'-Aktionen
Set Is_Going_to_buy_Repear_Man[(Integer A)] = True
Einheit - Order Hero[(Integer A)] to Bewegen nach (Position of Mercenary[(Integer A)])
Wait until (((Hero[(Integer A)] is in (Units within 512.00 of (Position of Mercenary[(Player number of (Player((Integer A))))]))) Gleich True) or (Hero_Is_Dead[(Integer A)] Gleich True)), checking every 1.00 seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Bedingungen
Hero_Is_Dead[(Integer A)] Gleich True
'THEN'-Aktionen
Set Is_Going_to_buy_Repear_Man[(Integer A)] = False
'ELSE'-Aktionen
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Bedingungen
(Hero[(Integer A)] is in (Units within 512.00 of (Position of Mercenary[(Integer A)]))) Gleich True
'THEN'-Aktionen
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Bedingungen
Or - Any (Conditions) are true
Bedingungen
((Player((Integer A))) Aktuelles Gold) Kleiner als 75
((Player((Integer A))) Aktuelles Holz) Gleich 0
'THEN'-Aktionen
Set Is_Going_to_buy_Repear_Man[(Integer A)] = False
'ELSE'-Aktionen
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Bedingungen
((Player((Integer A))) Aktuelles Gold) Größer als 74
((Player((Integer A))) Aktuelles Holz) Größer als 0
'THEN'-Aktionen
Einheit - Create 1 Repear-Man (Blutelf) for (Player((Integer A))) at (Position of Mercenary[(Integer A)]) facing 0.00 degrees
Spieler - Add -75 to (Player((Integer A))) Aktuelles Gold
Spieler - Add -1 to (Player((Integer A))) Aktuelles Holz
Set Repear_Man[(Integer A)] = (Random unit from (Units owned by (Player((Integer A))) of type Repear-Man (Blutelf)))
Einheit - Order Hero[(Integer A)] to Bewegen nach (Position of MainConstruction[(Integer A)])
Einheit - Order Repear_Man[(Integer A)] to Menschen-Arbeiter - 'Reparieren' MainConstruction[(Integer A)]
Wait until (((Hero[(Integer A)] is in (Units within 512.00 of (Position of MainConstruction[(Integer A)]))) Gleich True) or (Hero_Is_Dead[(Integer A)] Gleich True)), checking every 1.00 seconds
Set Is_Going_to_buy_Repear_Man[(Integer A)] = False
'ELSE'-Aktionen
'ELSE'-Aktionen
'ELSE'-Aktionen

Would be happy if you could help me
 
Level 5
Joined
Nov 14, 2004
Messages
159
Can you describe what does it suppose to do, and which part doesn't work out of it? It's hard to read without indexing "nests".

It would be even better if you could sent me in map, so I can read better and fix / play off map until it's fixed.
 
Status
Not open for further replies.
Top