Coding problem - Jump out of existence

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
User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Coding problem - Jump out of existence

Post by Joubarbe » Sun, 1. Jun 14, 18:26

Hi,

I have this code :

Code: Select all

* $AllShips array size : 2
for each $Ship in array $AllShips
  $Ship -> jump out of existence
end
Each time I run it, only 1 ship jumps out of existence. But if I use this code :

Code: Select all

* $AllShips array size : 2
for each $Ship in array $AllShips
  $Ship -> destroy object: killer=null, show no explosion=1
end
Both ships are destroyed and leave the game instantly.
Is this a stable function ?

Thanks.

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

Post by X2-Illuminatus » Sun, 1. Jun 14, 18:31

The <RefObj> jump out of existence command should not be used on OOS ships, as the script will not terminate. IS usage should be fine though.
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!

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe » Sun, 1. Jun 14, 18:39

I'm using this command IS.

Maybe an other good way to make a ship disappear ? A pro tip ? :)

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Sun, 1. Jun 14, 18:47

Create a new script called jump out of existence, in that script jump the ship out of existence.

In your main code (posted above), START the jump out of existence script.

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe » Sun, 1. Jun 14, 18:54

Thanks Mr Pro ! Working perfectly.

Post Reply

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