Author Topic: Getting VA not to Repeat inputs or ((sub commands))  (Read 5122 times)

sutex

  • Jr. Member
  • **
  • Posts: 91
Getting VA not to Repeat inputs or ((sub commands))
« on: August 19, 2016, 07:42:08 PM »
This is my Afterburner command.
The highlighted bit , is when I hit the Joystick button Afterburner the ((power to flight)) is activated , But I don't want it keep firing over and over as a keep boosting way , this is what I came up with , untested. Will it work ?


This is deploying weapons command.
When I hit my Fire button on the Joystick , the weapons are deployed , I had to disable the rest of the command too stop the Weapons from been stowed , when shooting, after using the fire button again.
The highlighted bit is not finished as I'm stuck on how to tell VA , not to listen too Joystick fire button input , when its already been called. Any suggestion on how to go about this
« Last Edit: August 19, 2016, 07:45:39 PM by sutex »

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Getting VA not to Repeat inputs or ((sub commands))
« Reply #1 on: August 19, 2016, 08:26:19 PM »
want it keep firing over and over as a keep boosting way , this is what I came up with , untested. Will it work ?
This'll repeat each time the command executes, as you're checking for anything but "0", and setting to "1", which isn't "0".

When I hit my Fire button on the Joystick , the weapons are deployed , I had to disable the rest of the command too stop the Weapons from been stowed , when shooting, after using the fire button again. The highlighted bit is not finished
Why do you need the highlighted bit? The first conditional check will run the "((Hardpoints))" command only on the first press, is that not the desired effect?

sutex

  • Jr. Member
  • **
  • Posts: 91
Re: Getting VA not to Repeat inputs or ((sub commands))
« Reply #2 on: August 19, 2016, 08:46:42 PM »
Finally after many reads , I saw what you meant so change does not = 0 To =0  ..


This is working now ..


Begin Small Integer Compare : [docking] Equals 0
    Begin Small Integer Compare : [flight] Equals 0
        Begin Small Integer Compare : [cargo-scoop] Does Not Equal 0
            Execute command, 'Retract scoop;Retract cargo scoop;Scoop up;Cargo scoop up;Close cargo bay;Close cargo bay doors (and wait until it completes)
            Set small int (condition) [cargo-scoop] value to 0
            Begin Small Integer Compare : [landing-gear] Does Not Equal 0
                Execute command, 'Retract landing gear;Raise landing gear;Retract docking modules;Raise docking modules;Landing gear up;Docking gear up;Docking modules up' (and wait until it completes)
                Set small int (condition) [landing-gear] value to 0
            End Condition
        End Condition
        Execute command, '((Power to Flight))' (and wait until it completes)   ......VA only fires this once now :)
        Execute command, '((Afterburners))' (and wait until it completes)
        Execute command, '((RS- Afterburners))' (and wait until it completes)
        Set small int (condition) [flight] value to 1
    End Condition
End Condition - Exit when condition met
Begin Small Integer Compare : [docking] Equals 1
End Condition - Exit when condition met
« Last Edit: August 20, 2016, 07:25:30 AM by sutex »

sutex

  • Jr. Member
  • **
  • Posts: 91
Re: Getting VA not to Repeat inputs or ((sub commands))
« Reply #3 on: August 20, 2016, 03:12:24 AM »
Quote
Why do you need the highlighted bit? The first conditional check will run the "((Hardpoints))" command only on the first press, is that not the desired effect?

Still working on the Hardpoints  need to have VA know that Ive pushed Joystick 1 (fire) so hardpoints are deployed  and not keep firing the command, .. working on that:)
« Last Edit: August 20, 2016, 07:22:23 AM by sutex »