Analogue Controls

This forum is currently in read-only mode.
From the Asset Store
Supports keyboard, mouse and gamepads. Supports several gamepads at once.
  • I'm trying to figure this out...

    • [CHANGE] Controls are between 0 - 1 to allow for analogue controls

    I don't quite get it - where can I actually set this up? I think David once told me how it works, but it was a bit more complicated and I forgot it.

    Basically, this should probably be implemented in a better way. Like, right now when you're setting up a 'control is down' action, there are 2 options: One for the control, one for the player number. Wouldn't it make sense to just put an 'Analogue Threshold' as a third option up there?

    Practical example would be:

    "Move Right"

    Player 1

    Analogue .5

    = Walk

    "Move Right"

    Player 1

    Analogue 1.0

    = Run

  • instead of using on-control, or controldown

    you can use 'Always', and the 'GetControlState' expression in mouse/keyboard

    (I will also add it to my custom controls plugin, I left it out by mistake)

    for instance,

     Always-Set Velocity X to  GetControlState("Move Right") * 10[/code:12uw5klu]
    Get Control State returns a value between 0 and 1
    also, many behaviors automatically set the speed depending on the 0-1 value
    
    also, if you want to set up your actions more similarly to how you said
    you could use the system-compare condition
    if GetControlState("Move Right",1) is greater than 0 - Walk
    if GetControlState("Move Right",1) is greater than 0.5 - Run
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Awesome, thanks Lucid!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)