I finally got around to installing X2 on my 98SE partition. Started a new game, saved after being told how to use a discoverer and opened up the script editor.
My first script: spawned an Argon Titan. It was empty of everything - just the ship itself.
My second script: spawned a Boron Manta. Again, it was empty.
3rd: spawned a smeg load of khaak into argon prime.
4th: spawned an advanced navsat into a sector of the user's choice.
5th: created a conditional script whereby if the player enters a sector with the Argon One in it, a smeg load of khaak appear.
So, I have questions.
Why do I have to put a variable at the start of every line that does something? eg, VAR=create ship, etc.
How do I spawn fully set-up ships?
in the create-ship line, you have 3 sets of co-ordinates - x, y and z. I take it that's where in the sector the ships are spawned? What happens if something is there? do I have to multiply the sector map co-ords by 222 in order to accurately span ships at set locations? (I tried to make the khaak spawn in the corners of the sector, by using x=50, y=50, z=50 etc, but they all appeared in the middle.)
Is there way to randomly generate said co-ordinates?
In the "create in" portion of that line, what arguements are valid? can I use sector-sector position instead of the x,y,z command?
How do I then tell said khaak to attack a singular random station?
Why did it take so long to find the equivalant of an "END IF" function?
How do I know when you've had enough of my n00bish questions?
How do I perform SAVE AS on a script, rather than overwrite the old version? (for creating templates)
My first scripting foray leaves me with questions...
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 18002
- Joined: Tue, 2. Sep 03, 05:57
-
- Posts: 2282
- Joined: Thu, 29. Jan 04, 08:19
1:
add default items is somewhere in trade command section.
2: you made it 50 meters, make it 50 kilometers by multiplying by 1000, so you end up with 50000
3: easy way is $x=random number from 0 to <var> -1 This command is found in general command section.
4: START <command> found in fly command section
5: Don't understand, you mean you were looking for a IF x then return null thing? return null is found in script calls in general command section.
6: How do you know when I'm bored? By when I answer n00bish questions!
7: copy it before editing, rename one copy and edit it.
Code: Select all
$ship=[THIS]->create ship:argon titan, etc.
$ship->add default items to ship
2: you made it 50 meters, make it 50 kilometers by multiplying by 1000, so you end up with 50000
3: easy way is $x=random number from 0 to <var> -1 This command is found in general command section.
4: START <command> found in fly command section
5: Don't understand, you mean you were looking for a IF x then return null thing? return null is found in script calls in general command section.
6: How do you know when I'm bored? By when I answer n00bish questions!
7: copy it before editing, rename one copy and edit it.