I'm using VA with EDDI in Elite Dangerous.
I'm trying to find a way to have EDDI automatically launch a new fighter when one is destroyed. I've been successful in waiting for the ((EDDI fighter rebuilt)) event and then launching that way, but I have two bays on my Corvette, and I'd like to launch the fighter immediately that is sitting idle in the other bay while the original rebuilds.
I had the idea of setting a custom variable and tracking the launch state that way, so I could know which bay to launch from. However, EDDI does not seem to write the custom variable.
For example, this script runs on ((EDDI fighter launched))
note that I have it set that null=0 for the lastfighterlaunched variable.
Pause 4 seconds
Begin Small Integer Compare : [lastfighterlaunched] Equals 0
Say, 'Fighter value not set. Setting to value one.'
set integer [lastfighterlaunched] value to 1
Else If Small Integer Compare : [lastfighterlaunched] Equals 1
Say, 'Fighter value was one, now set to value two.'
Set integer [lastfighterlaunched] value to 2
Else If Small Integer Compare : [lastfighterlaunched] Equals 2
Say, 'Fighter value was two. Now set to value one.'
Set integer [lastfighterlaunched] value to 1
End Condition
Numpad 2 is bound to "fighter aggressive" command.
Press NumPad 2 key and hold for 0.1 seconds and release
No matter how many times I launch the fighter, it only ever executes the first (0/null value) state, suggesting that the integer values for lastfighterlaunched are not being set.
What I am trying to do by this is later track which fighter last launched (and therefore will have the bay occupied) when the fighter is destroyed.
So for example, when the last fighter bay launched was 1, then I know to have my script go down a second time in the UI when selecting the fighter.
From ((EDDI vehicle destroyed)):
Begin Small Integer Compare : [lastfighterlaunched] Equals 1
Pause 1 second
Open the Roles panel
Press 3 key and hold for 0.1 seconds and release
Pause 0.05 seconds
Go left once in case we are in the right pane.
Execute command, 'UI Left' (and wait until it completes)
Pause 0.05 seconds
Go up a bunch of times to ensure we start at the top, regardless of where focus was when opened.
Execute command, 'UI Up' (and wait until it completes)
Pause 0.05 seconds
Execute command, 'UI Up' (and wait until it completes)
Pause 0.05 seconds
Execute command, 'UI Up' (and wait until it completes)
Pause 0.05 seconds
Execute command, 'UI Up' (and wait until it completes)
Pause 0.05 seconds
Go down one UI element to choose fighters
Execute command, 'UI Down' (and wait until it completes)
Pause 0.05 seconds
Select the fighter tab
Execute command, 'UI Select' (and wait until it completes)
Pause 0.05 seconds
go down one element to the second fighter
Execute command, 'UI Down' (and wait until it completes)
Select "deploy"
Execute command, 'UI Select' (and wait until it completes)
Pause 0.5 seconds
Execute command, 'UI Up' (and wait until it completes)
Go up a bunch of times in the pilot list so we are sure to start at the top.
Pause 0.5 seconds
Execute command, 'UI Up' (and wait until it completes)
Pause 0.5 seconds
Execute command, 'UI Up' (and wait until it completes)
Pause 0.5 seconds
Go down one UI element so we highlight the crew member
Execute command, 'UI Down' (and wait until it completes)
Pause 0.05 seconds
Launch the fighter
Execute command, 'UI Select' (and wait until it completes)
Any idea why the integers are not being set? Is there a better way to approach this? I don't see a way to query the state of the fighter bay directly.