Problem mit modifizierter galaxy.example.initplayership

Hier ist der ideale Ort um über Scripts und Mods für X²: Die Bedrohung zu diskutieren.

Moderators: Scripting / Modding Moderators, Moderatoren für Deutsches X-Forum

User avatar
Samuel Creshal
Posts: 17833
Joined: Sat, 6. Mar 04, 16:38
x3tc

Problem mit modifizierter galaxy.example.initplayership

Post by Samuel Creshal »

Code: Select all

Script galaxy.Example.initplayership
Version: 5
for Script Engine Version: 25

Description
Initialization of player ship for Example map
Arguments
1: setLoc , Var/Sector Position , 'Choose Position' 
2: SetShip , Var/Ship Type , 'Choose Ship' 
Source Text

001   * Set any Position and return it
002   *  Get Sector postion from input argument
003   $sec = $setLoc[0]
004   *  get sector xyz positions from argument
005   $x = $setLoc[1]
006   $y = $setLoc[2]
007   $z = $setLoc[3]
008   * Set any Ship Type and return it
009   $ship = $SetShip[0]
010   * Create and equip ship
011   *  Create ship
012   $plship =  create ship: type=$ship owner=Player addto=$sec x=$x y=$y z=$z
013   *  Equip it
014   $plship -> add default items to ship
015   $tmp = $plship -> add 1 units of Singularitäts Zeitverzerrungsantrieb
016   $tmp = $plship -> add 1 units of Boost Erweiterung
017   $tmp = $plship -> add 1 units of Digitales Sichtverbesserungssystem
018   $tmp = $plship -> add 1 units of Ekliptik Projektor
019   $tmp = $plship -> add 1 units of Tuning Modul MK1
020   $tmp = $plship -> add 1 units of Handelscomputer Erweiterung
021   $tmp = $plship -> add 1 units of Handelssoftware MK2
022   $tmp = $plship -> add 1 units of Handelssoftware MK1
023   $tmp = $plship -> add 1 units of Kampfsoftware MK1
024   $tmp = $plship -> add 1 units of Kampfsoftware MK2
025   $tmp = $plship -> add 1 units of Navigationssoftware MK1
026   $tmp = $plship -> add 1 units of Spezialsoftware MK1
027   $tmp = $plship -> add 1 units of Sprungantrieb
028   $tmp = $plship -> add 1 units of Landecomputer
029   $tmp = $plship -> add 1 units of Tarnvorrichtung
030   $tmp = $plship -> add 1 units of Triplex Scanner
031   $tmp = $plship -> add 1 units of Frachtscanner
032   $tmp = $plship -> add 1 units of Mineralienscanner
033   $tmp = $plship -> add 1 units of Steuerdüsenerweiterung
034   $tmp = $plship -> add 999999 units of Laderaumerweiterung
035   $tmp = $plship -> add 30 units of Energiezellen
036   $tmp = $plship -> add 50 units of Triebwerkstuning
037   return $plship
Ich hab das Script so modifiziert, dass man über Arguments die gewünschten Daten beim Aufruf übergeben kann... aber wenn ich das Script starte und die Daten eingebe, passiert nix :(
User avatar
Lucike
Posts: 12969
Joined: Sun, 9. May 04, 21:26
x4

Post by Lucike »

009 $ship = $SetShip[0]

Das "[0]" muss weg. SetShip ist keine Array, oder gleich SetShip benutzen. ;)

Gruß
Lucike
Image
User avatar
Samuel Creshal
Posts: 17833
Joined: Sat, 6. Mar 04, 16:38
x3tc

Post by Samuel Creshal »

schön :)

Return to “X²: Die Bedrohung - Scripts und Modding”