Sorry if this has been asked before but will there ever be any "systems awareness" for toggles built in to the profiles.
Wayyyyy back when I built a primitive profile that set a "status" for when things like the landing gear was down, and if it was, and I said "lower landing gear" it wouldn't raise it, but would respond with "already lowered" or something to that effect.
Is there a way to integrate this into the HCSVP's?
EDIT: On further inspection, I see that Booleans are being set for these things, but seemingly not used to verify the state of the toggle within the command itself. I rigged a very crude "if false then toggle and set true" | "if true then do nothing" type of (probably profile-breaking) conditions, but is there a way to get this kind of check built properly into the profile?
EDIT 2: Okay, I've been playing around with this and I need someone to tell me why this wouldn't work and my logic is flawed and terrible because I am a poopoo coder (we'll use Hardpoints as an example):
---
Boolean
---
Variable Set Commands (VAR)
(These are just for convenience of using the "execute command" vs. having to set variables each time, they can also be used to manually reset the boolean for things like SRV deployment, etc.)
((VAR - Hardpoints Deployed - True))
((VAR - Hardpoints Deployed - False))
---
Key commands
((Hardpoints))
---
Variable Action Commands (VARCMD)
(These are to be used for the "intent" of the parent command)
((VARCMD - Deploy Hardpoints))
((VARCMD - Retract Hardpoints))
---
Spoken Commands
(Here's a few examples of how the spoken commands do the checks)
Deploy Hardpoints
So this is the standard deploy command, it is impossible to retract hardpoints by accident with this command. The only reason for the extra boolean check in this specific command is to modify the audio output if the hardpoints are already deployed.
The underlying method makes more sense with the "red alert" command for example:
((Red_Alert))
So instead of doing a boolean check in every command that intends to deploy hardpoints, it will just use the variable command with the boolean check built in.
[deploy;] [hardpoints;weapons;] Attack protocol Alpha
Again, by replacing every direct call to the key command with the VARCMD with the correct intention (deploy, retract) it prevents it from doing the unintended thing without having to manually check variables in every single command, and while not breaking the key command itself.
Okay, so, first off, tell me why this is dumb and will break everything, and if not... is this something that can be integrated into the profiles in future releases??
Wayyyyy back when I built a primitive profile that set a "status" for when things like the landing gear was down, and if it was, and I said "lower landing gear" it wouldn't raise it, but would respond with "already lowered" or something to that effect.
Is there a way to integrate this into the HCSVP's?
EDIT: On further inspection, I see that Booleans are being set for these things, but seemingly not used to verify the state of the toggle within the command itself. I rigged a very crude "if false then toggle and set true" | "if true then do nothing" type of (probably profile-breaking) conditions, but is there a way to get this kind of check built properly into the profile?
EDIT 2: Okay, I've been playing around with this and I need someone to tell me why this wouldn't work and my logic is flawed and terrible because I am a poopoo coder (we'll use Hardpoints as an example):
---
Boolean
Code:
"Hardpoints Deployed"
Variable Set Commands (VAR)
(These are just for convenience of using the "execute command" vs. having to set variables each time, they can also be used to manually reset the boolean for things like SRV deployment, etc.)
((VAR - Hardpoints Deployed - True))
Code:
Set Boolean [Hardpoints Deployed] to True
Code:
Set Boolean [Hardpoints Deployed] to False
Key commands
((Hardpoints))
Code:
Begin Text Compare : [edDeployHardpointToggle] Has Been Set Press variable key(s) [edDeployHardpointToggle] and hold for 0.1 seconds and release Else Press U key and hold for 0.03 seconds and release End Condition Begin Boolean Compare : [Hardpoints Deployed] Equals False Execute command, '((VAR - Hardpoints Deployed - True))' (and wait until it completes) Else Execute command, '((VAR - Hardpoints Deployed - False))' (and wait until it completes) End Condition - Exit when condition met
Variable Action Commands (VARCMD)
(These are to be used for the "intent" of the parent command)
((VARCMD - Deploy Hardpoints))
Code:
Begin Boolean Compare : [Hardpoints Deployed] Equals False Execute command, '((Hardpoints))' (and wait until it completes) End Condition
Code:
Begin Boolean Compare : [Hardpoints Deployed] Equals True Execute command, '((Hardpoints))' (and wait until it completes) End Condition
Spoken Commands
(Here's a few examples of how the spoken commands do the checks)
Deploy Hardpoints
Code:
Begin Text Compare : [Game state] Does Not Equal 'normal space' Execute command, '((command ignored))' (by name) (and wait until it completes) End Condition - Exit when condition met Begin Boolean Compare : [Hardpoints Deployed] Equals False // Check for variable Execute command, '((VARCMD - Deploy Hardpoints))' // Another redundant check that won't accidentally retract if deployed (makes more sense in other commands) Execute command, '((RS - Hardpoints Deploy))' (by name) (and wait until it completes) Else Play sound, '{VA_SOUNDS}\hcspack-KATE\Weapons\Weapons free.wav' // This just provides verbal feedback the command was accepted End Condition - Exit when condition met
The underlying method makes more sense with the "red alert" command for example:
((Red_Alert))
Code:
Begin Text Compare : [Combat_alert] Equals 'Red alert' Begin Boolean Compare : [Skip] Equals False Pause 4 seconds End Condition Set Text [Combat_alert] to 'Not Set' Execute command, '((VARCMD - Deploy Hardpoints))' // this will ensure the hardpoints won't retract if already out Execute command, '((RS - Hardpoints Deploy))' (by name) (and wait until it completes) // the audio will still happen regardless, inconsequential Pause 2 seconds Execute command, 'attack protocol alpha' (by name) (and wait until it completes) Set Boolean [Skip] to [Not Set] End Condition
[deploy;] [hardpoints;weapons;] Attack protocol Alpha
Code:
Begin Text Compare : [Game state] Does Not Equal 'normal space' Execute command, '((command ignored))' (by name) (and wait until it completes) End Condition - Exit when condition met Execute command, '((RS - Attack Protocol Alpha))' (by name) Pause 0.3 seconds Set Text [Pips to set] to 'weapons shields' Execute command, 'power to weapons and shields' (by name) (and wait until it completes) Pause 1 second Begin Text Compare : [{LASTSPOKENCMD}] Starts With 'Deploy' Execute command, '((VARCMD - Deploy Hardpoints))' (and wait until it completes) Execute command, '((RS - Hardpoints Deploy))' (by name) (and wait until it completes) End Condition
Okay, so, first off, tell me why this is dumb and will break everything, and if not... is this something that can be integrated into the profiles in future releases??
Comment