• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to insert QWER as hot keys into my map ?

Status
Not open for further replies.
Level 14
Joined
Apr 20, 2009
Messages
1,543
If you really want to speed up this process without using the object editor, learn http://www.hiveworkshop.com/forums/jass-ai-scripts-tutorials-280/lua-object-generation-191740/.
(You need to have some programming experience)

If you want to do this you'll need to make a loop that iterates through a range of raw codes.
Then you can alter all the objects within the range of raw codes like this:
JASS:
//! externalblock extension=lua ObjectMerger $FILENAME$
    //! i local rawcodes = {}
    //! i rawcodes[1] = "A000"
    //! i rawcodes[2] = "A001"
    //! i rawcodes[3] = "A002"
    //! i for i=1, 3 do
        //! i modifyobject(rawcodes[i])
        //! i makechange(current, "ahky", "Q")
    //! i end
//! endexternalblock
In this example all abilities with raw code A000 - A002 will have their hotkey set to Q.
You might want to use a better way of targeting the raw codes so that you won't have to manually type them in one by one.
You'll need to find a pattern.

An example of how to use such a pattern:
JASS:
//! externalblock extension=lua ObjectMerger $FILENAME$
    //! i local rawcodes = {}
    //! i for i=0, 9 do
        //! i rawcodes[i] = "A00" .. i
        //! i modifyobject(rawcodes[i])
        //! i makechange(current, "ahky", "Q")
    //! i end
//! endexternalblock
This will set the hotkey to Q for all raw codes from A000 - A009
Of course if you understand how this works, more customized patterns can be made ;)
(A very advanced customized pattern that searches for specific jumbled up abilities probably takes more time then adjusting it in the object editor though xD)

If all of the abilities that need Q as their hotkey have something in common, it's simple. If not, it would probably be better to edit them inside the object editor.
Same goes for the other hotkeyed abilities.

You might need some advanced knowledge in order to use Lua Object Generation.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
There is no alternative next to changing the hotkeys for every ability to be what you want. A smart script could be made to do it but by the time you have done that you will probably have been able to manually change all entries and in any case there will always be a few problematic entries which have to be done manually.
 
Status
Not open for further replies.
Top