Adding number to a position?

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Renothian
Posts: 5
Joined: Sat, 14. Mar 15, 19:58

Adding number to a position?

Post by Renothian » Sun, 17. Sep 17, 00:48

Ok, I am trying to make a script that will put lasertowers around a gate. What I am trying to figure out is how I "get position" and then ADD say 500 km to that position and place tower there, in the end having a script that places towers in a (using the right positions and numbers) half circle around the gate...

My question is, how do I "get position" and then add a number to that position in the variable?

User avatar
Zaitsev
Posts: 2007
Joined: Tue, 2. Dec 08, 01:00
x4

Post by Zaitsev » Sun, 17. Sep 17, 09:00

You mean something like the Ring Of Fire script?
I'm sorry, I can't hear you over the sound of how awesome I am :D

DiDs:
Eye of the storm Completed
Eye of the storm - book 2 Inactive
Black Sun - Completed
Endgame - Completed

BlackArchon
Posts: 1016
Joined: Wed, 4. Feb 04, 17:37
xr

Post by BlackArchon » Sun, 17. Sep 17, 09:01

You could take a look at the "Ring of fire" script by Gazz which places lasertowers around a gate.

Edit: Too late...

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24962
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Sun, 17. Sep 17, 15:03

Renothian wrote:My question is, how do I "get position" and then add a number to that position in the variable?
There are different get position commands in the General Object Commands: The first three return the mentioned single coordinate, while the fourth returns them in an array. Once you have the coordinate you need, you use <RetVar/IF><Expression> from the General Commands to select your variable and perform basic calculations with it.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

Renothian
Posts: 5
Joined: Sat, 14. Mar 15, 19:58

Post by Renothian » Sun, 17. Sep 17, 20:49

Thanks, I got the Ring of Fire script, but I'm also going to play with the the expression command just to see what I get from it :)

Renothian
Posts: 5
Joined: Sat, 14. Mar 15, 19:58

Post by Renothian » Mon, 18. Sep 17, 02:46

I looked at the Ring of Fire and have one question now...

Can you "stealth/cloak" advanced satelites the same way ROF does for laser towers? Or is there a way to just stop satelites from showing up in the ship list on the right? I got them out of my property list but would like to remove their clutter from the ship/station list...

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”