Also mit dem gehts los:
es erzeugt eine Flotte (habs hier jetz auf eins gekürtzt)
zeile 013 == Install Shiptunings: Laderaum + Ruder + Triebwerk
zeile 014 == Install Softwares (Kampfsoft, Handelssoft......)
zeile 015 == Install Waffen und Shild je nach ShipType
zeile 016 == give a Command (Leadership == Patrol // Wings == Prateckt Leadership)(indem Fall LeaderShip == Patrol)
Code: Select all
Script x534.plugin.fleet5.sv
Version: 5
for Script Engine Version: 32
Description
X534 (GAMMA) Fleet5 Ships
Arguments
Source Text
001 * ==================================================================
002 * Script by SuperVegeta at 07.08.2006
003 * ==================================================================
004
005 $sektor = get sector from universe index: x=16, y=0
006 $xenon = Xenon
007
008
009 * Enemy Defend Fleet (Fleet=Xenon P / L / M / N)
010 * Feindschiff = Xenon P = 2
011 @ = wait 50 ms
012 $XM6.1 = create ship: type=P owner=Xenon addto=$sektor x=20500 y=null z=null
013 @ START $XM6.1 -> call script 'x534.install.shiptuning.03' :
014 @ START $XM6.1 -> call script 'x534.xfleet.install.TI.02' :
015 @ START $XM6.1 -> call script 'x534.xfleet.install.WS.01.sv' : Ship.Type=P
016 @ START [THIS] -> call script 'x534.enemyfleet3.cmd.3.1.sv' : Leader=$XM6.1 Sektor=$sektor
017 @ = wait 50 ms
018 return null
Nächst Script
soll solang laufen wie Leadership existiert und Race Xenon ist.
macht es auch nich ???????
zeile 005 set Ralation to Feind, all Race without Xenon and Neutral
zeile 018 set Command Patrol in Sektor
zeile 028 Suche FeindShip innerhalb von Dist zum Leader und nicht Race Xenon or Neutral, gieb es ans Script.x534.enemyfleet3.cmd.3.1.sv zurück.
zeile 035 Leader Attack the FeindShip und folge nicht in anderen Sektor.
zeile 069 Suche FeindStation in Dist zum Leader die nicht Race Xenon or Neutral ist und gieb sie ans Script.x534.enemyfleet3.cmd.3.1.sv zurück
zeile 076 Leader Attack FeindStation und folge nicht in andern Sektor.
zeile 096 Suche während des Kampfes mit der FeindStation, FeindShips in Dist zum Leader die nicht Race Xenon or Neutral sind und gieb es ans Script.x534.enemyfleet3.cmd.3.1.sv zurück.
----> wenn FeindShip exist === Script begind von vorn !!!
Code: Select all
Script x534.enemyfleet3.cmd.3.1.sv
Version: 0
for Script Engine Version: 32
Description
x534 (GAMMA) enemyfleet cmd X-Fleet M6 cmd
Arguments
1: Leader , Var/Ship , 'Leader'
2: Sektor , Var/Sector , 'Sektor'
Source Text
001 * ==================================================================
002 * Script by SuperVegeta at 08.08.2006
003 * ==================================================================
004 $Leader -> set race logic control enabled to [FALSE]
005 @ START $Leader -> call script 'x534.Relation.X.sv' :
006 $Xenon = Xenon
007
008 while $Leader -> exists
009
010 Patrol:
011 @ = wait 1000 ms
012 $Leader.Race = $Leader -> get owner race
013 if $Leader.Race != $Xenon
014 return null
015 end
016
017
018 @ START $Leader -> call script '!ship.cmd.patrol.std' : Sector=$Sektor
019
020 * ==================================================================
021
022 next.Ship:
023 $Leader.Race = $Leader -> get owner race
024 if $Leader.Race != $Xenon
025 return null
026 end
027
028 @ $Feind.Ships = [THIS] -> call script 'x534.enemyfleet.ship.sv' : Sektor=$Sektor Race=$Xenon Leader=$Leader Meter=5000
029
030 if $Feind.Ships == null
031 goto label next.Station
032 end
033
034 if $Feind.Ships != null
035 @ START $Leader -> call script '!fight.attack.object' : the victim=$Feind.Ships follow in new sector=[FALSE]
036 end
037
038 write to player logbook $Feind.Ships
039
040 while $Feind.Ships != null
041 $Leader.Race = $Leader -> get owner race
042 if $Leader.Race != $Xenon
043 return null
044 end
045
046 $Race.Feind.Ship = $Feind.Ships -> get owner race
047 if $Race.Feind.Ship == $Xenon OR $Race.Feind.Ship == Neutrale
048 goto label next.Ship
049 end
050
051 $Dist.Ship = get distance between $Leader and $Feind.Ships
052 if $Dist.Ship > 5000
053 goto label next.Ship
054 end
055 @ = wait 1000 ms
056 end
057
058
059 * ==================================================================
060
061
062 next.Station:
063 @ = wait 1000 ms
064 $Leader.Race = $Leader -> get owner race
065 if $Leader.Race != $Xenon
066 return null
067 end
068
069 @ $Feind.Station = [THIS] -> call script 'x534.enemyfleet.station.sv' : Leader=$Leader Sektor=$Sektor Race=$Xenon Meter=7500
070
071 if $Feind.Station == null
072 goto label Patrol
073 end
074
075 if $Feind.Station != null
076 @ START $Leader -> call script '!fight.attack.object' : the victim=$Feind.Station follow in new sector=[FALSE]
077 end
078
079 write to player logbook $Feind.Station
080
081 while $Feind.Station != null
082 $Leader.Race = $Leader -> get owner race
083 if $Leader.Race != $Xenon
084 return null
085 end
086
087 $Dist.Station = get distance between $Leader and $Feind.Station
088 if $Dist.Station > 7500
089 goto label Patrol
090 end
091
092 @ $Feind.Ships = [THIS] -> call script 'x534.enemyfleet.ship.sv' : Sektor=$Sektor Race=$Xenon Leader=$Leader Meter=5000
093
094 if $Feind.Ships != null
095 goto label Patrol
096 end
097 @ = wait 2000 ms
098 end
099
100
101 @ = wait 1000 ms
102 end
103
104
105 return null
Die Scripte die Station oder Ship suchen sind gleich,
außer: Ship Array fom Sektor // Station Array from Sektor
Nächstes Script
Sucht Ship oder Station
1. innerhalb einer bestimmten Distance vom Leader ist.
2. Ship was nicht Race Neutral ist oder Race Xenon ist
3. dann wright ins playerlook Ship
4. und dann giebt es das gefundene Ship an das Startscript zurück
Code: Select all
Script x534.enemyfleet.get.Ship.sv
Version: 0
for Script Engine Version: 32
Description
Description
Arguments
1: Leader , Var/Ship , 'Leader'
2: Sektor , Var/Sector , 'Sektor'
3: Race , Var/Race , 'Race'
4: Meter , Var/Number , 'Meter'
Source Text
001 * ==================================================================
002 * Script by SuperVegeta at 10.08.2006
003 * ==================================================================
004 @ = wait 10 ms
005 $Array = $Sektor -> get ship array from sector/ship/station
006 $Array.size = size of array $Array
007 while $Array.size
008 dec $Array.size =
009 $Objeckt = $Array[$Array.size]
010
011 if $Objeckt -> exists
012
013
014 $dist = get distance between $Leader and $Objeckt
015 if $dist < $Meter
016
017 $owner = $Objeckt -> get owner race
018 if $owner != Neutrale
019 if $owner != $Race
020
021 write to player logbook $Objeckt
022 return $Objeckt
023
024 end
025 @ = wait 10 ms
026 end
027 @ = wait 10 ms
028 end
029 @ = wait 10 ms
030 end
031 @ = wait 10 ms
032 end
033
034
035 return null
nun zum Prob:
mit der return $Objekt
dürfte nur ein objekt angegeben werden............JA
im Playerlook wird geschrieben:
"Unbekanntes Objekt"
"Unbekanntes Objekt"
"Unbekanntes Objekt"
"Ship"
"Unbekanntes Objekt"
"Unbekanntes Objekt"
1. obwohl garkein "Unbekanntes Objekt" dah ist.
2. ohne die return $Ship in der mitte
kommen nochmehr "Unbekanntes Objekt" + die Vuale==Ships
"Unbekanntes Objekt" ungefähr wie Ships im gesammten Sektor
####wenn die Ausgabewerte keinen ortentlichen wert haben
kann man ja nicht wirklich was mit dem Arrays anfangen####
hab ich auch mit Station.Array probiert.
selbst mit mein Goner.Map.Updata.Service
---->das gleiche in grün
ich hab den GMUS auf X3 V.1.4.2 geschrieben
---> dah lief er einwandfrei
jetz hab ich X3 V.1.4.3
----> und jetz spinnen die Arrays
Normal für X3 V.1.4.3 ?????
Kennt das einer ????
Ist das bekannt ????
Giebts ne Lösung ???
irgendwas ?????