HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Units with Hotkeys?

08-26-2006, 03:51 AM#1
Cerdinz
Is there a way to make a number key select a unit using triggers?

Example: I have three units of different types and everything. I want the gamer to be able to press 1 if they want to select unit A, 2 for unit B and 3 for unit C
08-26-2006, 03:58 AM#2
Wyvernoid
call BJDebugMsg("Hello player and follow the instruction. Select the first unit and input Ctrl+1, and the second Ctrl+2, and third Ctrl+3. Now you can select them by typing 1, 2, 3.")

;-P
08-26-2006, 04:04 AM#3
Cerdinz
...Are you sure that this can't be forced by a trigger or anything? I mean... I don't mind doing this but it would be cooler and more practical if it did it at the beginning of the map
08-26-2006, 04:06 AM#4
Wyvernoid
I... am... almost... sure.
'Cause even you did this, the player can modify it by presing Ctrl+1 later in the game, as I said.
08-26-2006, 04:14 AM#5
darkwulfv
you could make it so that its said in a chat message...
"-1" or something than have a trigger check for it... bout all i can think of :p
08-26-2006, 04:30 AM#6
Cerdinz
All I would have to do then is make the trigger repeat itself at regular intervals, no?
And tehre would be no real point in changeing the groups because my map only has 3 controlable units
08-26-2006, 06:37 AM#7
blu_da_noob
If you make them all heroes the player can use the F1/F2/F3 keys.
08-27-2006, 03:58 AM#8
Cerdinz
How do I make an ordinary unit into a hero without having to make a new unit? If i change the units themselves I'll have to rewrite many scripts
08-27-2006, 06:55 AM#9
Wyvernoid
IMPOSSIBLE. SORRY TO TELL YOU.
08-27-2006, 05:58 PM#10
Cerdinz
IMPOSSIBLE TO WHAT, SET A HOTKEY OR MAKE A UNIT A HERO?
08-27-2006, 06:01 PM#11
Alevice
Both, I think. i remember trying that for assigning weapons, but I couldn't find a way :/
08-27-2006, 07:46 PM#12
iNfraNe
Making a unit into a hero isnt so hard. Just copy a hero and make all the fields the same as the unit's :)
08-27-2006, 10:24 PM#13
Cerdinz
Quote:
Originally Posted by iNfraNe
Making a unit into a hero isnt so hard. Just copy a hero and make all the fields the same as the unit's :)

Mmm, no that wouldn't work because of the unit's name JASSwise. gg_unit_hfoo0002 wouldn't be that anymore. I guess I'll just rewrite my script and make them three heroes, it's not so bad.

Thanks to everybody who helped out in finding ways of doing this. I'm still open to suggestions, eh I'll check this thread every few days
08-27-2006, 10:27 PM#14
Alevice
If you are not using the Esc key, you could use it to toggle between the units.
08-27-2006, 10:38 PM#15
Cerdinz
Quote:
Originally Posted by Alevice
If you are not using the Esc key, you could use it to toggle between the units.

Oh? This "toggling" intrigues me. Care to elaborate?