Global variables, What is possible with the SE ?

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
Posts: 1054
Joined: Thu, 4. Jun 09, 17:08

Global variables, What is possible with the SE ?

Post by PSCO1 » Fri, 29. Jun 18, 20:55

Hi all,

Iam back since few time on X3TC and after some times working on my personnal mod (NMCE, not the cockpitMod), I added some good scripts from the community, well as a lot of people :)

And I would like to speak about this script:
Release Passengers (1.0.1) by X2-Illuminatus

This script dont reward player with money, just reward player of notority points...
I like money and so, I decided to modify this script to have:

1 - Release passengers (then add money to player in accordence of race sector, +add notority like original version, etc etc.. few more conditions, also added possibility to sell passenger as slave in pirate bases...)

2 - Scan Passengers from the player ship (if Bioscanner installed) to check if, and thats where the problems begins..., to check if passenger is a Pirate, or Yaki, etc etc...

There is a sort of "Cover" for ejected Pirates, right ?
After a lot of searchs, only 1 function add/remove this "Cover", and it seems to be impossible to GET this variable in the SE...
I probably understand why EgoSoft devs didnt added the "Get..." command in SE...

At this point, I decided to read some scripts from the absolute musthave "NPC Bailing Addon" (ThisIsHarsh)
And sadly, no traces of this hypothetical command.. :(
All is scripted to avoid to have a Pirate in a Spacesuit. thats confirmed my feelings...

Another thing, when a passenger is ejected, his stats about FightSkill, Morale, Aggressivity etc... are recreated after the Spacesuit(ship) is created, but not the name and the race.. well I suppose we cant do anything

And to back to the thread question, I dont know what is possible with Global variables, for my little experience, for me, Global variables can be readable by all scripts of the game, am I right ?

My goal so, is to create a globalVar who add a "Pirate or not" tag on the space suit created (in NPC Bailing Addon in the "eject" script)
and read this variable in "my" script "Release.Passengers"...

Something like this:

Code: Select all

$spacesuit set global variable: name=<var/string> value=<value>
Its an error of syntax ofcourse. is there a possibility ?
Last edited by PSCO1 on Fri, 29. Jun 18, 21:16, edited 1 time in total.

User avatar
Posts: 3593
Joined: Tue, 31. Oct 06, 13:11

Post by Joubarbe » Fri, 29. Jun 18, 21:13

Code: Select all

get owner race
get true owner
Compare the two and then you'll have the current pirate cover state.

Posts: 1054
Joined: Thu, 4. Jun 09, 17:08

Post by PSCO1 » Fri, 29. Jun 18, 21:24

Thanks for this quick reply Joubarbe !!
I will try this ! 1000x thanks !

Post Reply

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