• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

replace a Unit but hold the Controlgroup

Status
Not open for further replies.
Level 3
Joined
Jan 25, 2017
Messages
9
Hello,
i want to know how i can replace/change a Unit/building but hold the Controlgroup (crtl +1 ) for the new unit then ?

- i add unitA to crtl + 1 then if i replace/change the Unit to unitB, then the new Unit is in crtl +1 too ?
 
Nope, there's no way to set control groups via code. ForceUIKey() only works on 1 key at a time so you cant get ctrl+1 to happen that way. Maybe with a memhack that allows you to simulate keypresses on the player's machine but that's probably pretty involved for what you need.

Best solution would be to show an error message for the player whose unit was replaced to tell them they need to remake the ctrl group.
 
Status
Not open for further replies.
Back
Top