Hi
Ich hab da mal eine Frage zu folgenden Punkt im Map Script Editor und zwar ob es möglich ist Endlosschleifen zu erstellen die sich selbst immer erweitern.
Aktuell arbeite ich an einer Map wo über den Script nach ein paar Sekunden, Wellen von Feinden auftauchen. Nach einer weile werden es halt immer mehr Wellen, die auch immer stärker werden.
Mein Problem ist nun das 1 Welle von gut 10 Einheiten zu scripten eigentlich kein Problem ist, doch wenn man so mindestens 100 Wellen scripten will dann, dann wird man schon gut nach der 10ten Welle verrückt weil immer und immer wieder der gleichen Vorgang (grob 40 Zeilen script pro Welle) erledigen muss bis auf ein paar kleine leichte Veränderungen.
Bisher habe ich da nur 2 möglichkeiten gefunden.
Die erste ist wohl die die hoffentlich noch funktioniert.
Script Recyclen.
Sind dann zwar auch pro Welle viel zu viele Scripts aber das ist noch ertragbar wenn man später immer mehr Recyclen.
Das andere wäre ein Automatischer Prozess.
Da es die möglichkeit gibt im Editor Berechnungen zu machen, hoffe ich ja das man damit vielleicht arbeiten könnte.
Nun mal hier ein Teil des Script
Welle 1
Order:
Platzierung
*** IF ***
Timer '/Welle' has expired.
*** THEN ***
Turn AI Wall Builder for Player '<This Player's Enemies>' On
Spawn Unit 'Nod Wave 1 Emessary 01' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 01'
Play Sound 'GDI_RadarScan' as though it was a 2D sound (NOT RECOMMENDED for 3D sounds).
Unit 'Nod Wave 1 Emessary 01' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Spawn Unit 'Nod Wave 1 Emessary 02' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 02'
Unit 'Nod Wave 1 Emessary 02' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Spawn Unit 'Nod Wave 1 Emessary 03' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 03'
Unit 'Nod Wave 1 Emessary 03' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Spawn Unit 'Nod Wave 1 Emessary 04' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 04'
Unit 'Nod Wave 1 Emessary 04' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Spawn Unit 'Nod Wave 1 Emessary 05' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 05'
Unit 'Nod Wave 1 Emessary 05' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Spawn Unit 'Nod Wave 1 Emessary 06' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 06'
Unit 'Nod Wave 1 Emessary 06' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Spawn Unit 'Nod Wave 1 Emessary 07' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 07'
Unit 'Nod Wave 1 Emessary 07' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Spawn Unit 'Nod Wave 1 Emessary 08' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 08'
Unit 'Nod Wave 1 Emessary 08' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Spawn Unit 'Nod Wave 1 Emessary 09' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 09'
Unit 'Nod Wave 1 Emessary 09' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Spawn Unit 'Nod Wave 1 Emessary 10' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 10'
Unit 'Nod Wave 1 Emessary 10' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Turn Skirmish AI for Player Player '<This Player's Enemies>' On
Order:
Welle Wins
*** IF ***
Unit 'Nod Wave 1 Emessary 01' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 01' has reached the end of Waypoint Path 'Wave 1'
*** OR ***
Unit 'Nod Wave 1 Emessary 02' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 02' has reached the end of Waypoint Path 'Wave 1'
*** OR ***
Unit 'Nod Wave 1 Emessary 03' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 03' has reached the end of Waypoint Path 'Wave 1'
*** OR ***
Unit 'Nod Wave 1 Emessary 04' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 04' has reached the end of Waypoint Path 'Wave 1'
*** OR ***
Unit 'Nod Wave 1 Emessary 05' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 05' has reached the end of Waypoint Path 'Wave 1'
*** OR ***
Unit 'Nod Wave 1 Emessary 06' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 06' has reached the end of Waypoint Path 'Wave 1'
*** OR ***
Unit 'Nod Wave 1 Emessary 07' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 07' has reached the end of Waypoint Path 'Wave 1'
*** OR ***
Unit 'Nod Wave 1 Emessary 08' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 08' has reached the end of Waypoint Path 'Wave 1'
*** OR ***
Unit 'Nod Wave 1 Emessary 09' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 09' has reached the end of Waypoint Path 'Wave 1'
*** OR ***
Unit 'Nod Wave 1 Emessary 10' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 10' has reached the end of Waypoint Path 'Wave 1'
*** THEN ***
All of Player '<This Player's Enemies>''s buildings and units are dealt a lethal amount of damage.
Ordner: Kill Wave Unit
*** IF ***
Unit 'Nod Wave 1 Emessary 01' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
*** IF ***
Unit 'Nod Wave 1 Emessary 02' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
*** IF ***
Unit 'Nod Wave 1 Emessary 03' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
*** IF ***
Unit 'Nod Wave 1 Emessary 04' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
*** IF ***
Unit 'Nod Wave 1 Emessary 05' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
*** IF ***
Unit 'Nod Wave 1 Emessary 06' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
*** IF ***
Unit 'Nod Wave 1 Emessary 07' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
*** IF ***
Unit 'Nod Wave 1 Emessary 08' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
*** IF ***
Unit 'Nod Wave 1 Emessary 09' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
*** IF ***
Unit 'Nod Wave 1 Emessary 10' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
(Ich hatte versucht diesen Teil auf 1 Script zu vereinfachern aber irgendwie spinnt der Script dann total rum.)
Tja so sieht bisher 1 Welle aus und ich darf wirklich für jede weitere Welle den ganzen kram komplett nach Editieren.
Kopieren nimmt mir zwar schon eine menge Arbeit ab aber es ist immer noch zuviel.
Das sind gut mal 5-15 Minuten rum geklicke pro Welle.
Bei 100 geplanten Wellen vollkommen inakzeptable.
Sooo, hat jemand also eine Lösung oder eine Idee wie man das noch mehr vereinfachen kann und dabei das Grundprinzip bei behält?
Ich hab da mal eine Frage zu folgenden Punkt im Map Script Editor und zwar ob es möglich ist Endlosschleifen zu erstellen die sich selbst immer erweitern.
Aktuell arbeite ich an einer Map wo über den Script nach ein paar Sekunden, Wellen von Feinden auftauchen. Nach einer weile werden es halt immer mehr Wellen, die auch immer stärker werden.
Mein Problem ist nun das 1 Welle von gut 10 Einheiten zu scripten eigentlich kein Problem ist, doch wenn man so mindestens 100 Wellen scripten will dann, dann wird man schon gut nach der 10ten Welle verrückt weil immer und immer wieder der gleichen Vorgang (grob 40 Zeilen script pro Welle) erledigen muss bis auf ein paar kleine leichte Veränderungen.
Bisher habe ich da nur 2 möglichkeiten gefunden.
Die erste ist wohl die die hoffentlich noch funktioniert.
Script Recyclen.
Sind dann zwar auch pro Welle viel zu viele Scripts aber das ist noch ertragbar wenn man später immer mehr Recyclen.
Das andere wäre ein Automatischer Prozess.
Da es die möglichkeit gibt im Editor Berechnungen zu machen, hoffe ich ja das man damit vielleicht arbeiten könnte.
Nun mal hier ein Teil des Script
Welle 1
Order:
Platzierung
*** IF ***
Timer '/Welle' has expired.
*** THEN ***
Turn AI Wall Builder for Player '<This Player's Enemies>' On
Spawn Unit 'Nod Wave 1 Emessary 01' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 01'
Play Sound 'GDI_RadarScan' as though it was a 2D sound (NOT RECOMMENDED for 3D sounds).
Unit 'Nod Wave 1 Emessary 01' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Spawn Unit 'Nod Wave 1 Emessary 02' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 02'
Unit 'Nod Wave 1 Emessary 02' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Spawn Unit 'Nod Wave 1 Emessary 03' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 03'
Unit 'Nod Wave 1 Emessary 03' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Spawn Unit 'Nod Wave 1 Emessary 04' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 04'
Unit 'Nod Wave 1 Emessary 04' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Spawn Unit 'Nod Wave 1 Emessary 05' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 05'
Unit 'Nod Wave 1 Emessary 05' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Spawn Unit 'Nod Wave 1 Emessary 06' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 06'
Unit 'Nod Wave 1 Emessary 06' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Spawn Unit 'Nod Wave 1 Emessary 07' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 07'
Unit 'Nod Wave 1 Emessary 07' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Spawn Unit 'Nod Wave 1 Emessary 08' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 08'
Unit 'Nod Wave 1 Emessary 08' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Spawn Unit 'Nod Wave 1 Emessary 09' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 09'
Unit 'Nod Wave 1 Emessary 09' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Spawn Unit 'Nod Wave 1 Emessary 10' of type 'NODEmissary' on Team 'Wave' at waypoint Waypoint 'Wellen Punkt 10'
Unit 'Nod Wave 1 Emessary 10' EXACTLY follows waypoints, beginning at Waypoint Path 'Wave 1'
Turn Skirmish AI for Player Player '<This Player's Enemies>' On
Order:
Welle Wins
*** IF ***
Unit 'Nod Wave 1 Emessary 01' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 01' has reached the end of Waypoint Path 'Wave 1'
*** OR ***
Unit 'Nod Wave 1 Emessary 02' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 02' has reached the end of Waypoint Path 'Wave 1'
*** OR ***
Unit 'Nod Wave 1 Emessary 03' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 03' has reached the end of Waypoint Path 'Wave 1'
*** OR ***
Unit 'Nod Wave 1 Emessary 04' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 04' has reached the end of Waypoint Path 'Wave 1'
*** OR ***
Unit 'Nod Wave 1 Emessary 05' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 05' has reached the end of Waypoint Path 'Wave 1'
*** OR ***
Unit 'Nod Wave 1 Emessary 06' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 06' has reached the end of Waypoint Path 'Wave 1'
*** OR ***
Unit 'Nod Wave 1 Emessary 07' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 07' has reached the end of Waypoint Path 'Wave 1'
*** OR ***
Unit 'Nod Wave 1 Emessary 08' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 08' has reached the end of Waypoint Path 'Wave 1'
*** OR ***
Unit 'Nod Wave 1 Emessary 09' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 09' has reached the end of Waypoint Path 'Wave 1'
*** OR ***
Unit 'Nod Wave 1 Emessary 10' exists and is alive.
*AND* Unit 'Nod Wave 1 Emessary 10' has reached the end of Waypoint Path 'Wave 1'
*** THEN ***
All of Player '<This Player's Enemies>''s buildings and units are dealt a lethal amount of damage.
Ordner: Kill Wave Unit
*** IF ***
Unit 'Nod Wave 1 Emessary 01' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
*** IF ***
Unit 'Nod Wave 1 Emessary 02' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
*** IF ***
Unit 'Nod Wave 1 Emessary 03' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
*** IF ***
Unit 'Nod Wave 1 Emessary 04' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
*** IF ***
Unit 'Nod Wave 1 Emessary 05' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
*** IF ***
Unit 'Nod Wave 1 Emessary 06' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
*** IF ***
Unit 'Nod Wave 1 Emessary 07' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
*** IF ***
Unit 'Nod Wave 1 Emessary 08' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
*** IF ***
Unit 'Nod Wave 1 Emessary 09' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
*** IF ***
Unit 'Nod Wave 1 Emessary 10' has been destroyed.
*** THEN ***
Player '<This Player's Enemies>' gets $ 20
(Ich hatte versucht diesen Teil auf 1 Script zu vereinfachern aber irgendwie spinnt der Script dann total rum.)
Tja so sieht bisher 1 Welle aus und ich darf wirklich für jede weitere Welle den ganzen kram komplett nach Editieren.
Kopieren nimmt mir zwar schon eine menge Arbeit ab aber es ist immer noch zuviel.
Das sind gut mal 5-15 Minuten rum geklicke pro Welle.
Bei 100 geplanten Wellen vollkommen inakzeptable.
Sooo, hat jemand also eine Lösung oder eine Idee wie man das noch mehr vereinfachen kann und dabei das Grundprinzip bei behält?
Kommentar