• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Force UI Key

Status
Not open for further replies.
Level 12
Joined
Jun 1, 2009
Messages
576
Hi guys i have one more problem, i want to make that i can use item in first invertory slot by clicking some button on keyboard..... I tried by making it like this

Event: Player - Keyboard Event (Player 1 presses the up arrow key)

Action: Game - Force UI Key (Force Player 1 to press the key NumPad 7)

NumPad 7 is hotkey for first invertory slot.

But this trigger didnt work
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
Hi guys i have one more problem, i want to make that i can use item in first invertory slot by clicking some button on keyboard..... I tried by making it like this

Event: Player - Keyboard Event (Player 1 presses the up arrow key)

Action: Game - Force UI Key (Force Player 1 to press the key NumPad 7)

NumPad 7 is hotkey for first invertory slot.

But this trigger didnt work

Numpad is not really a key. Change it to 7. Lets see if it will work.

I know there is a key for NumPad 7 but I think Warcraft just doesnt accept this.
 
Level 12
Joined
Jun 1, 2009
Messages
576
  • Item
  • Events
    • Player- YourEvent Here
  • Conditions
  • Actions
    • For each Integer A from 1 to 6, do actions:
      • loop actions:
      • Set int = random number from 1 to Integer A
        • If - int == 1 then
          • Hero - Order Hero to use Item on unit/point/
        • else

If i am not wrong this trigger will force me to use item in my invertory on specific unit or point......and that is not what i wanted.......Becouse i need to CHOSE my target INSIDE the game if you understand me....

I just need that when i click on some key game select item in my invertory slot and then i can DECIDE on which unit or point will i use it......

Whay i wanted to do this when i just can use direcly key on my keyboard........becouse i want to change hotkey it is to far, it need to be close to hotkeys of some spells...
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
why do you try to force num 7 from press up anyways, just press num 7 directly
I think that Force Player xy to press xyz only works for AI
because of how poorly some things of wc3 are made, you can only detect arrow keys preses/releases
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
If i am not wrong this trigger will force me to use item in my invertory on specific unit or point......and that is not what i wanted.......Becouse i need to CHOSE my target INSIDE the game if you understand me....

I just need that when i click on some key game select item in my invertory slot and then i can DECIDE on which unit or point will i use it......

Whay i wanted to do this when i just can use direcly key on my keyboard........becouse i want to change hotkey it is to far, it need to be close to hotkeys of some spells...

If you want to target a different units, well, depending on the spell you're using just store that into a variable.
 
Status
Not open for further replies.
Top