Using the caps lock key?

Hey,

Thinking about some ideas for my next game, 'Key'.
So if I make a rule that asks if the caps lock key is pressed, is this toggled? In what way?
I actually kind of hope it is. It'd add a cool dimension to it.

Thanks,
- Thomas

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    Hi @SnapFireStudios Yes, this can be toggled as such:

    Rule: When actor receives event key caps lock is down
    -----your behaviours
    Otherwise
    ------different behaviours
  • SnapFireStudiosSnapFireStudios Member Posts: 1,603
    @gyroscope - So.. are you saying that if you tap the caps lock key and make the green light come on (if you're on a mac), then even once you lift you finger, those rules would keep going? That was my real question; does it act like the other keys or not.

    - Thomas
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2013

    The behaviours will stop once the caps lock is up (and run any different behaviours within that, if there are any), providing the behaviours used are interruptible (unlike Interpolate, for instance, which would need a workaround).

    A small test:

    Display Text scene.Count

    Rule: When actor receives event key caps lock is down
    Timer Every 1 second ---- run to Completion off
    Change Attribute Count to Count+1
    Otherwise
    ----nothing

    When the caps lock is pressed, the number "Count" will start counting up, but as soon as the caps lock is unlocked, i.e up, it'll stop. Is that the sort of thing you mean?
  • SnapFireStudiosSnapFireStudios Member Posts: 1,603
    @gyroscope - Ok, to bad it's not different from the other keys.
    - Thomas
  • SnapFireStudiosSnapFireStudios Member Posts: 1,603
    @gyroscope - Wait.. what is this workaround for interrupting interpolation? Now that's something i'd love to know.
    - Thomas
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2013

    I'll see if I can find the gamefile I did... (or the thread where it was discussed, I seem to remember there were other solutions too)... give me a few mins....
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2013
    @gyroscope - Ok, to bad it's not different from the other keys.
    - Thomas
    Oh, I see, then just put all your key press rules nested in a main rule set to any: When actor receives event key caps lock is down or When actor receives event key caps lock is up.... I'm thinking that should work out, though not tested... OK, off to search for that interpolate stop workaround again... ;-)
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    There you go, @SnapFireStudios, hope you find it useful:

    "Is there any way to stop an Interpolate once it has started?" >>>
    http://forums.gamesalad.com/discussion/comment/361704/#Comment_361704

  • SnapFireStudiosSnapFireStudios Member Posts: 1,603
    @gyroscope - Nice! That make a lot of sense.
    - Thomas
Sign In or Register to comment.