1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Let your favorite entries duke it out in the 15th Techtree Contest Poll.
    Dismiss Notice
  4. Weave light to take you to your highest hopes - the 6th Special Effect Contest is here!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Detect when a certain keyboard key is pressed?

Discussion in 'World Editor Help Zone' started by robot-dude, Oct 28, 2011.

  1. robot-dude

    robot-dude

    Joined:
    Jun 16, 2007
    Messages:
    1,499
    Resources:
    5
    Models:
    4
    Maps:
    1
    Resources:
    5
    Hello, just wondering if this is possible without doing vjass?

    To design a trigger which detects if a keyboard button is pressed for e.g. "Z".

    Then it will run an action which will create an item on the unit owned by triggering player.

    If this is possible only in vjass mind someone doing this for me n posting the script here?


    Actions are:
    - Detects which item is carried hero in slot 1 then replaces it with a specific item.
     
  2. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,174
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    It is only possible if you have a unit selected, and the unit has an ability with Z hotkey.
     
  3. robot-dude

    robot-dude

    Joined:
    Jun 16, 2007
    Messages:
    1,499
    Resources:
    5
    Models:
    4
    Maps:
    1
    Resources:
    5
    I know theres ways to do it in vjass, since i've seen alot of systems using this in maps. If i had any spell room left i would. but i want it to be hidden and don't wish to use esc.

    I could always do F2 by making another hero called activate/deactivate and unselect the hero. and then process the actions. Just wanted to use a simply "Z" key.
     
  4. mckill2009

    mckill2009

    Joined:
    Mar 10, 2009
    Messages:
    4,696
    Resources:
    34
    Maps:
    5
    Spells:
    27
    JASS:
    2
    Resources:
    34
    keyboard support is only for arrow keys, esc and hotkeys for abilities, so maker's suggestion is the answer...
     
  5. nyks078

    nyks078

    Joined:
    Oct 28, 2011
    Messages:
    23
    Resources:
    0
    Resources:
    0
    Without vJass, i think you can change the hold position hotkey to "z" using customkeys,

    ...a not-so-good-but-can-be-helpful idea =D