How do you change the starting sector of a new game (with a new map) and how do you change the ship in which the player starts? It seems to default to the coordinates of Argon Prime, with an Argon Discoverer.
-Shamas the wise Shaman
Setting starting sector and starting ship.
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 39
- Joined: Fri, 11. Aug 06, 08:13
-
- Posts: 1091
- Joined: Mon, 14. Aug 06, 22:29
-
- Posts: 39
- Joined: Fri, 11. Aug 06, 08:13
What about a script?
Is there a script that will position the Player into a new spot once a new game has been started?
-Shamas the wise Shaman
-Shamas the wise Shaman
-
- Posts: 522
- Joined: Thu, 13. Apr 06, 12:35
-
- Posts: 1091
- Joined: Mon, 14. Aug 06, 22:29
-
- Posts: 960
- Joined: Wed, 20. Sep 06, 09:57
How to set start sector and ship (and money!)
This is done by means of a special script. This script has to be named galaxy.{YourMapName}.initplayership, with YourMapName being the name of your map. If you name your map Universe.xml for example, the script name would be galaxy.Universe.initplayership.
This script take no arguments and must return the ship of the player. You can call any script you want from this script, as long as none of the called scripts uses PLAYERSHIP (which doesn't exist at that moment). Ah, and don't forget to add a little money to the player...
So, here's a useful script (in pseudocode):
Happy positioning,
Chris Gi
This script take no arguments and must return the ship of the player. You can call any script you want from this script, as long as none of the called scripts uses PLAYERSHIP (which doesn't exist at that moment). Ah, and don't forget to add a little money to the player...
So, here's a useful script (in pseudocode):
Code: Select all
$sec = get sector from universe index: x=$x, y=$y
$startship = create ship: type={ShipType} owner=Player addto=$sec x=0 y=0 z=0
= $startship -> install {as much as you want} units of {whatever you wand}
add money to player: {as much as you want}
return $startship
Chris Gi