Hotkeys not Shown/Active (Selling Units)

sevensc

New Member
Reaction score
8
Target Outcome: To have a unit shrine that...
1) Sells units (not train)
2) Can be upgraded (have a new set of units)
3) Have hotkeys shown/active for units
4) If the player hotkeyed the shrine (ie. ctrl+1) the shortcut will remain intact

Explanation of what I have figured out/tried:
If a unit is sold and not trained, it is not removed from the shrine what it upgrades. I got around this by using "AddUnitToStockBJ" and "RemoveUnitFromStockBJ"; however, adding units in this manner isn't showing the unit's hotkeys.

So instead, I tried replacing the shrine with the next level or shrine when an upgrade completes, but this loses any player group short cuts (ctrl+1, etc).

Does anyone know if there is a solution to this? And ideas would be great.

Thanks
 
D

dariidar

Guest
This seems rather simple.
Maybe all you want is :
Techtree- Upgrades to (Shrine Level 2)
Then the player won't lose his hotkeys.

Hotkeys shown/active for units:
You know how in the game, when you move your mouse over a unit like a Footman in the Barracks, it says Train Footman with the F yellow?

This tutorial says how to do it. http://world-editor-tutorials.thehelper.net/colors.php
First, in Object editor, Select Footman. Then scroll down to Text- Hotkey and type 'F.'
Then, underneath that, it says Text- tooltip.
Type in "Buy |cffffcc00F|ootman"
And you're set.
 

sevensc

New Member
Reaction score
8
Setting that up isn't a problem. It's what and if I add the units in the Object Editor, the old units don't go away when I upgrade the shrine, and if I add/remove the units with triggers, the hotkeys don't display/activate.

I want all 4 conditions met that I listed. It sounds so simple but nothing is working.
 

Synthetics

New Member
Reaction score
7
I have a system that you should find very useful

Start
Events
Unit - A unit Begins construction <--- change the event to whatever applies
Conditions
(Unit-type of (Triggering unit)) Equal to Barracks
Actions
Wait 0.10 seconds
Neutral Building - Add Bandit to (Triggering unit) with 20 in stock and a max stock of 20
Neutral Building - Add Brigand to (Triggering unit) with 20 in stock and a max stock of 20
Neutral Building - Add Enforcer to (Triggering unit) with 10 in stock and a max stock of 10
Neutral Building - Add Assassin to (Triggering unit) with 10 in stock and

This builds the initial 'page'

when you make upgrade, it done by unsing dummy spell thunderclap


Upgrade to lvl2
Events
Unit - A unit Begins casting an ability
Conditions
((Unit-type of (Casting unit)) Equal to Barracks and ((Ability being cast) Equal to Upgrade lvl2 )
Actions
Wait 0.10 seconds <-change this to the length of time you want to
Neutral Building - Remove Bandit from (Triggering unit)
Neutral Building - Remove Brigand from (Triggering unit)
Neutral Building - Remove Enforcer from (Triggering unit)
Neutral Building - Remove Assassin from (Triggering unit)
Unit - Upgrade lvl2 from (Triggering unit)<--- remove abilty to unit
Wait 0.50 seconds <-change this to the length of time you want to
Neutral Building - Add Centaur Impaler to (Triggering unit) with 3 in stock and a max stock of 10
Neutral Building - Add Centaur Outrunner to (Triggering unit) with 5 in stock and a max stock of 10
Neutral Building - Add Centaur Sorcerer to (Triggering unit) with 2 in stock and a max stock of 10
Neutral Building - Add Centaur Champion to (Triggering unit) with 1 in stock and a max stock of 3
Unit - Add Upgrade lvl 3 to (Triggering unit)<--- add abilty to unit

You will never get the Hotkeys working with sold units to the best of my knowledge, but this is the only way to do what you want

The Ctrl+1 Hotkey will work as well
Sells units

so 3 out of 4 ain't bad eh?

Hope that helps

Edit:
oops i've just realised i've told you something you already know but i cant delete this :(
 

sevensc

New Member
Reaction score
8
Haha, yea - that is similar to what I have already done (though in jass). Thanks anyways for trying to help, I apreciate it.
 

sevensc

New Member
Reaction score
8
Looks like I'll need to go hotkeyless unless someone has a last minute bit of knowledge.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top