[SCRIPTING] How to create debris ?
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
[SCRIPTING] How to create debris ?
Hey,
I'd like to create station and ship debris, but I cannot find them in X-Studio. In President's End, I can see both of them though (LU).
I'd like to create station and ship debris, but I cannot find them in X-Studio. In President's End, I can see both of them though (LU).
- DrBullwinkle
- Posts: 5715
- Joined: Sat, 17. Dec 11, 01:44
create special...
Peace through superior firepower
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
afaik the only way to get them in a var in X3 is with the return Value of create special. not sure if LU added some posibilities there. (in X2 there is the workaround with the Sectorobjects, but it works only IS and these commands are not available in X3 anymore)
if not stated otherwise everything i post is licensed under WTFPL
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Yeah I had hope with this :
But it doesn't work
Code: Select all
$allCollObj = $sector -> get collision objects
for each $obj in array $allCollObj
$obj -> destroy object: killer=$Value, show no explosion=0
end
in LU, the "get collision objects" command returns a list of ships that a ship is actively trying to avoid as its "colliding" with them, as far as i know we never added the ability to "find special", for some reason i have a vague memory of a conversation Litucbe and i had about it but i dont remember the outcome.
Like UniTrader said, if you store the return value of create special you can manipulate it that way, just create an array or table and attach it to the sector, and add all specials you create to that array or table within that sector specific local variable.
Like UniTrader said, if you store the return value of create special you can manipulate it that way, just create an array or table and attach it to the sector, and add all specials you create to that array or table within that sector specific local variable.
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
These specials are really weird... They cannot be rotated, for instance.
Anyway, what I'd like to do is to remove all the default billboards in the game, that's why I was asking this question...
Oh, by the way :
That's powerful ! Better than arrays of arrays of arrays of arrays to "emulate" structures. So thanks for that again Jack
EDIT : Well... Considering that your "tables" are not "maps", it's better to do a table of tables, instead of mixing arrays and tables :
Anyway, what I'd like to do is to remove all the default billboards in the game, that's why I was asking this question...
Oh, by the way :
Code: Select all
$myTable = table alloc
$myTable2 = table alloc
table set $myTable ( 'one' ) = 1
table set $myTable ( 'two' ) = 2
table set $myTable2 ('string') = 'string'
dim $myArray = $myTable, $myTable2
$myVal = $myArray[0]
$myVal15746 = $myArray[1]
$myVal2 = table get $myVal ( 'one' )
$myVal3 = table get $myVal ('two')
$myVal4 = table get $myVal15746 ('string')
write to player logbook $myVal2
write to player logbook $myVal3
write to player logbook $myVal4
* output : 1, 2, string
EDIT : Well... Considering that your "tables" are not "maps", it's better to do a table of tables, instead of mixing arrays and tables :
Code: Select all
$allStations = table alloc
* HQ
$station = table alloc
table set $station ('id') = 0
table set $station ('type') = {Argon Headquarters}
table set $allStations (0) = $station
* Military Outpost
$station = table alloc
table set $station ('id') = 1
table set $station ('type') = {Argon Military Outpost}
table set $allStations (1) = $station
$stationTable = table get $allStations ($stationID)
$stationType = table get $stationTable ('type')
$station = create station: type=$stationType owner=$owner addto=$sector x=$x y=$y z=$z