Author Topic: Semi-advanced crouch bind  (Read 3947 times)

A-10

  • Guest
Semi-advanced crouch bind
« on: December 03, 2017, 04:27:38 PM »
So I was thinking of getting into more advanced things since I know how the basic binds work.
I could just use 2 different binds: Crouch and Uncrouch to toggle L CTRL repsectively.
This would be for Skyrim, if that helps on why I would be interested in this kind of setup.

I was seeing if I could make something a bit more advanced, like:
  • Me: Crouch
  • VA: Sneaks for me (presses down L CTRL button indefinately + waits indefinately until next voice command is met.)
  • Me: Uncrouch
  • VA: Uncrouches (releasing L CTRL button)
And that would be the end of the script until Crouch is called on again

Gangrel

  • Caffeine Fulled Mod
  • Global Moderator
  • Full Member
  • *****
  • Posts: 216
  • BORK FNORK BORD
Re: Semi-advanced crouch bind
« Reply #1 on: December 03, 2017, 06:25:34 PM »
Pseudocode
When I say "crouch"

Begin Boolean Compare : [varCrouch] Equals True
    Release Left Ctrl key
    Set Boolean [varCrouch] to Toggle
End Condition - Exit when condition met
Begin Boolean Compare : [varCrouch] Equals False
    Press down Left Ctrl key
    Set Boolean [varCrouch] to Toggle
End Condition - Exit when condition met



A-10

  • Guest
Re: Semi-advanced crouch bind
« Reply #2 on: December 03, 2017, 06:53:27 PM »
Pseudocode
When I say "crouch"

Begin Boolean Compare : [varCrouch] Equals True
    Release Left Ctrl key
    Set Boolean [varCrouch] to Toggle
End Condition - Exit when condition met
Begin Boolean Compare : [varCrouch] Equals False
    Press down Left Ctrl key
    Set Boolean [varCrouch] to Toggle
End Condition - Exit when condition met

That somewhat works, but it wont release Left Ctrl key for some reason. This was the issue I was having with my lesser advanced script(s) too. I know it doesnt release it because I have to press the button to alt+tab out of the game.

EDIT: The "Press down" and "Release" parts doesnt work for some reason, specifically the release, but if I switch it to this:
Code: [Select]
When I say "crouch"

Begin Boolean Compare : [varCrouch] Equals True
    Toggle Left Ctrl key
    Set Boolean [varCrouch] to Toggle
End Condition - Exit when condition met
Begin Boolean Compare : [varCrouch] Equals False
    Toggle Left Ctrl key
    Set Boolean [varCrouch] to Toggle
End Condition - Exit when condition met

This works just fine.

EDIT2: For some reason it needs to be repeated 2x, so I put that "This command repeats: 2 Times" and it works perfectly now. Seems strange...but it works 100% now.
« Last Edit: December 03, 2017, 07:18:56 PM by A-10 »