Is there a way to "Amp up" an AI ship with upgraded properties as if it were to have an Amp Gem equipped? (Not just talking fire rate here, since I know that can be upgraded, but more things like weapons range.)
grab the ships UID and set whether it has an ampgem to true?
Quote from: Oblivion on December 18, 2016, 10:19:45 AM
grab the ships UID and set whether it has an ampgem to true?
Could work. However, you can play with the properties (inherent energy, build rate, heal rate, fire rate) to have a similar effect except for the increased range.
Quote from: Sorrontis on December 18, 2016, 10:26:02 AM
Quote from: Oblivion on December 18, 2016, 10:19:45 AM
grab the ships UID and set whether it has an ampgem to true?
Could work. However, you can play with the properties (inherent energy, build rate, heal rate, fire rate) to have a similar effect except for the increased range.
Indeed, though it's pretty much the range part I need. :P
Also, I'm pretty much the noobiest noob at coding. Haven't a clue how to grab a UID or anything really. I had a look on the wiki as well, and uh, I still don't have a clue about what and how and why and where. :/
I don't suppose anyone could give me an example?
To get ships:X Y Range 0 GetAllShipsInRange
leaves a list of UIDs on the stack.
To get UID(s): list GetLstCount
check this is gt 0, I.e. The list has something (here a UID) in it.list 0 GetListElement
leaves you a UID
Now check ShipIsEnemy, and use SetShipHasAmp.
I don't have a real keyboard at the moment, if I did then I'd write the entire script here.
Edit: Now we're cooking with fusion! A real keyboard.
Let's see:
(We're only running this once, if you need a spawner's ships to be amped then it gets a little longer).
once
CurrentCoords 0.99 0 GetAllShipsInRange ->Ships
<-Ships GetListCount 0 do
<-Ships[I] ->Ship
<-Ship.ShipIsEnemy if
<-Ship 1 SetShipHasAmp #If the compiler chokes here, V has made the ship amping read-only.
endif
loop
endonce
I tried to give that script there a go, see if it would work, but the thing spewed an error back at me.
(http://i.imgur.com/HLr86uj.jpg)
In that case, I doubt that I can make it work. When we finish the wiki, we can be sure, but I think that it's not going to work in this form.