- 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
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