Author Topic: How do I ensure the correct crew member responds to a custom command?  (Read 4411 times)

Jonny Shiloh

  • Guest
Here's what I'm trying to achieve - in Elite: Dangerous, I issue the command "Turn orbital lines on" and the in-system orbital lines appear, so far so good. However, I'd like my Science Officer to respond with an affirmative. At the moment I'm fudging this slightly - because I know that Kate is my Science Officer, I'm just using a "Play random sound" from her "Acknowledgement" folder as follows:

Code: [Select]
Play random sound (from directory: {VA_SOUNDS}\hcspack-KATE\Acknowledgements - suppress repeats)
What I'd like to be able to do, is have whoever I choose as my Science Officer reply, so for example if I made Verity my SO at some point, I wouldn't need to change the script.

Is there a variable I can use that calls whichever character is the current SO?

TheThingIs

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 278
    • HCS Voicepacks
Re: How do I ensure the correct crew member responds to a custom command?
« Reply #1 on: February 04, 2018, 07:23:16 PM »
there is already a cmd for toggling orbit lines and is set to engineering

[disable;enable;show;hide;toggle;] Orbit lines

if you want to change it then just change ~~role to science
The Singularity profile - One profile to rule them all and at HCS we bound them ;)

You see, TheThingIs, eventually you'll be allright.

Jonny Shiloh

  • Guest
Re: How do I ensure the correct crew member responds to a custom command?
« Reply #2 on: February 05, 2018, 09:01:06 AM »
Many thanks! Is there a way to search for commands when editing a profile?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: How do I ensure the correct crew member responds to a custom command?
« Reply #3 on: February 05, 2018, 09:39:31 AM »
Use the "list filter" textbox at the bottom center of the "Edit a Profile" window, it'll search when you stop typing.

Jonny Shiloh

  • Guest
Re: How do I ensure the correct crew member responds to a custom command?
« Reply #4 on: February 05, 2018, 02:09:18 PM »
Thanks! Is there a list of functions, e.g. if I want to create a command "Ahead half" which sets my supercruise engines to 50% and elicits an acknowledgement from the helm - I see this command for "impulse"

Code: [Select]
[quarter;one quarter;half;three quarter;full;maximum] Impulse

Begin Boolean Compare : [Training mode] Equals False
    Begin Condition : ([Game state] Does Not Equal 'fighter' AND [Game state] Does Not Equal 'normal space' AND [Game state] Does Not Equal 'supercruise')
        Execute command, '((command ignored))' (by name)
    End Condition - Exit when condition met
End Condition
Execute command, '((Every command START))' (by name)

Set Text [~~Role] to 'helm'
Set Text [~~spoken] to '{CMDSEGMENT:0}'
Execute command, '((number conversion))' (by name) (and wait until it completes)
Execute command, '((RS - Impulse {TXT:~~spoken}%))' (by name) (and wait until it completes)
Execute command, '(({TXT:~~spoken}%))' (by name)

Execute command, '((Every command END))' (by name)

but if I want to set my supercruise engines to the command rather than my impulse engines, how would I do that?

TheThingIs

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 278
    • HCS Voicepacks
Re: How do I ensure the correct crew member responds to a custom command?
« Reply #5 on: February 05, 2018, 05:05:11 PM »
You'll need to brush up some more on VA programming tbh but basically you add your "voice trigger" to the end of the list of voice triggers and in the code something like this:

voice trigger added at end: ;Ahead half

Begin Condition : [{LASTSPOKENCMD}] = 'Ahead half'
    Set Text [~~spoken] to 'fifty'
end

HTH :)
The Singularity profile - One profile to rule them all and at HCS we bound them ;)

You see, TheThingIs, eventually you'll be allright.

Jonny Shiloh

  • Guest
Re: How do I ensure the correct crew member responds to a custom command?
« Reply #6 on: February 06, 2018, 04:10:34 AM »
Very helpful, thanks both. I'll go and see if I can find any documentation, I'm quite keen to get Elite as automated as I can before I venture into VR.

TheThingIs

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 278
    • HCS Voicepacks
Re: How do I ensure the correct crew member responds to a custom command?
« Reply #7 on: February 06, 2018, 04:38:53 AM »
Gary's most excellent manual for all VA programming info is in the VA folder...or right click the VA symbol on the top left of VA
The Singularity profile - One profile to rule them all and at HCS we bound them ;)

You see, TheThingIs, eventually you'll be allright.

Jonny Shiloh

  • Guest
Re: How do I ensure the correct crew member responds to a custom command?
« Reply #8 on: February 06, 2018, 04:46:08 AM »
I am indeed working through it right now :) Thanks again.