bengoin wrote:what would be a good number to add the the radius?
[X3 Script] Lasertower Array [2.0.01 compatible Upgrade]
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
- NZ-Wanderer
- Posts: 1623
- Joined: Thu, 5. Aug 04, 01:57
I have found if I want to ring a gate, using 700 is a good number, it seems to be the right amount to take any enemy out that dares jump through the gate
Link to the list of Mods working in X4-Foundations and also Link to the list of Mods working in X-Rebirth
NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.
NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.
Re: suggestion
You know the bad thing about retrieving Lasertowers made from this script is when you redeploy them they lose there 125MW and go back to the default 25MW,Malakie wrote:Hi,
Is there any way to get this script to work with other ships instead of the ship I am in??
I did not understand that it only created the array around the ship my pilot is flying directly at first... I kept sending one of my ships to a location and telling it to deploy but it did not do anything... or so I thought. Imagine my surprise when I looked outside and saw over 100 laser towers pointed at me suddenly!! Thank god they were on my side! This is probably my funniest X3 moment to date).
And thank god for the retrieve deployed item command from another script (I think it is AalaardB's). I had to have one of my largest freighters retrieve all those towers.. imagine if I had to do it manually..
Anyhow, it would cool if there were some way to tell a different ship to do this so I could continue doing other things...
Malakie
could someone make it stop? 83k for each one when relocating, expensive
u could tag the lasertower by using a local varible
so when thier deployed again if they have this tag, you can put a 125mw shield back on without the lose of money
not sure if this does it yet or not, but it might be worth using the laser towers in the cargo hold to deply instead of creating new ones
if theres not enough for the full array, just charge for the extra ones that are needed
so when thier deployed again if they have this tag, you can put a 125mw shield back on without the lose of money
not sure if this does it yet or not, but it might be worth using the laser towers in the cargo hold to deply instead of creating new ones
if theres not enough for the full array, just charge for the extra ones that are needed
Due to the MSCI handbook all variables defined in a script are temporary, i.e. they are gone once the script has finished. I could not find any section on local variables but I would expect that the temporary nature is the same.
If I understand you correctly then assigning a local variable to an object (lasertower in this case) will stick to it like an object ID. So even after some game play time, loading of savegames etc. this object would still have the local variable attached to it, right?
I'm just curious to clarify this point because I once had a similar idea to tag objects by setting a special object ID. Apparently that is not possible.
Cheers Euclid
If I understand you correctly then assigning a local variable to an object (lasertower in this case) will stick to it like an object ID. So even after some game play time, loading of savegames etc. this object would still have the local variable attached to it, right?
I'm just curious to clarify this point because I once had a similar idea to tag objects by setting a special object ID. Apparently that is not possible.
Cheers Euclid
oh how I wish..
Cycrow wrote:yeah scripts work the same way as multithreading does
they appear to run simultaneous, but in actual fact, only 1 thread is being process at any given time.
so when u have a script running, no other scripts will get processed until that script has finished, and if it takes long to finish the game cant be updated which gives you the temporary freezing, to solve this, you have interrupts, which will alow the game engine to carry on updating without blocking, so when the script reaches an interupt, more of the game gets process then it returns back this scripts and continues
so even a short wait will allow other scripts and the game engine to inturupt when it needs to process something else, which prevents the freezing.
Oh how I wish the Amiga was still around like in the old days.. Multitasking in true form. Geez I miss being able to run anything I wanted all at the same time.
I still have two of them but obviously I cannot play X3 on it... Now if Egosoft would update the code to take advantage of machines with dual core processing.. perhaps we could get 'some' multitasking out of the game...
Malakie
HOw about...
Hi,
Since you did not or were not able to add a command so we can tell it how many actual laser towers we want, what about a command to remove them all if need be.. It is a real pain when I set them up only to find they end up hitting friendly stations because of where they are located... Picking them up is a real pain especially since you cannot sell them anywhere.
Malakie
Since you did not or were not able to add a command so we can tell it how many actual laser towers we want, what about a command to remove them all if need be.. It is a real pain when I set them up only to find they end up hitting friendly stations because of where they are located... Picking them up is a real pain especially since you cannot sell them anywhere.
Malakie
Re: HOw about...
The number of LT's to be placed in a single array is fixed because of the finite number representation in scripting. If anyone has an idea how to solve that......Malakie wrote:Hi,
Since you did not or were not able to add a command so we can tell it how many actual laser towers we want, what about a command to remove them all if need be.. It is a real pain when I set them up only to find they end up hitting friendly stations because of where they are located... Picking them up is a real pain especially since you cannot sell them anywhere.
Malakie
Incorporating a LT collect command is not that easy. First off it would collect all your LT's in a given sector and you may not want that. Secondly you would need a ship with sufficient cargo space to hold all the LT's and, in order not to lose the 125MJ shields, also the shields.
An alternative would be to sell all the deployed LT's in a given sector. That would be possible.
Cheers Euclid
Yes, that is possible. But selling them directly instead of collecting is easier to do.
Let's wait what happens in the next patch. Maybe the LT's come with 125MJ shields from the fab. The it's easy to to the collection.
Anyone cares to provide info on my question concerning set object ID or on the nature of local variables (see some posts above)?
Cheers Euclid
Let's wait what happens in the next patch. Maybe the LT's come with 125MJ shields from the fab. The it's easy to to the collection.
Anyone cares to provide info on my question concerning set object ID or on the nature of local variables (see some posts above)?
Cheers Euclid
yeah, when attaching local varibles to objects, that varible will then be saved and can be used across scripts and will still exist in save games.euclid wrote:Due to the MSCI handbook all variables defined in a script are temporary, i.e. they are gone once the script has finished. I could not find any section on local variables but I would expect that the temporary nature is the same.
If I understand you correctly then assigning a local variable to an object (lasertower in this case) will stick to it like an object ID. So even after some game play time, loading of savegames etc. this object would still have the local variable attached to it, right?
I'm just curious to clarify this point because I once had a similar idea to tag objects by setting a special object ID. Apparently that is not possible.
Cheers Euclid
the only problem is, im not sure how lasertowers in your cargo hold are classed.
Local varibles will work on the depolyed LT's easy enough but not sure about when there in your cargo hold, if there classed as individal objects, or just a ware representation
-
- Posts: 8
- Joined: Wed, 1. Mar 06, 07:47
nice script
question is it possible to make a circle with em witha second command or something.
so in stead of random places u would make a circle around a gate. could come in handy when placing em around a jumpgate,perhaps a 2nd number for different amouts of lasertowers
i think i would be something like u pick a gate, Y-Z plane orientation for a west-east gate X- Z for a north or south gate. with a fixed radius of,
i measured it with a disco i went at a side from the gate and it was 1.4 so probly the gd radius of one is 1.8km or something.
think this can be made?
question is it possible to make a circle with em witha second command or something.
so in stead of random places u would make a circle around a gate. could come in handy when placing em around a jumpgate,perhaps a 2nd number for different amouts of lasertowers
i think i would be something like u pick a gate, Y-Z plane orientation for a west-east gate X- Z for a north or south gate. with a fixed radius of,
i measured it with a disco i went at a side from the gate and it was 1.4 so probly the gd radius of one is 1.8km or something.
think this can be made?
EDIT lol... i made this big huge post without looking to see which thread i was in.... yes this can be used to make lasertower rings of fire around gates
Attenion: One of your ships is under attack: Heretics End... Attention: One of your ships is under attack: Heretics End... Attent...
Oh shut the @*#@ up its only a bloody adv sat!
Oh shut the @*#@ up its only a bloody adv sat!
This really isn't what I am looking for.... I am looking for something that when LTs are dropped en masse from a cargo hold (I can produce lots of free LTs) it simply aligns them into some sort of equally spaced pattern. That pattern can be a ring, sphere, or wall, I don't care as long as my freely produced LTs don't kill eachother when they fire. Maybe use the extra commands option to input X number of LTs dropped, they are then formed into one of the above patterns without charging me 6-some million credits.
That stated, A. does anybody know of any existing script that is better suited for my needs? If A. is negitive then B. how hard would it be to make something like this?
Thanks a billion in advance, Brian
:EDIT: I found "Ring of Fire" (http://forum2.egosoft.com/viewtopic.php?t=127826) further down the script list. This seems much better suited for what I need. Thanks anyways.
That stated, A. does anybody know of any existing script that is better suited for my needs? If A. is negitive then B. how hard would it be to make something like this?
Thanks a billion in advance, Brian
:EDIT: I found "Ring of Fire" (http://forum2.egosoft.com/viewtopic.php?t=127826) further down the script list. This seems much better suited for what I need. Thanks anyways.