• 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.

[Trigger] Make Unit Unsellable?

Status
Not open for further replies.
Level 10
Joined
Jun 10, 2007
Messages
557
In a map that's in it's early stages that I happen to be making, you open chests by buying a dummy unit. Once this dummy unit is bought, the chest opens and you get what's inside. However: once you buy the dummy unit, I'd like the icon to disappear. So no infinite restock cooldowns please. I'm afraid making units untrainable has two problems: the unit is not actually trained, it is bought, and that means the player could no longer buy that unit ever again. I want this to occur on individual chests.

If that isn't clear enough I can give a better description... I hope. Help?
 
Level 9
Joined
May 27, 2006
Messages
498
I dont remember now, but i think there should be an action "make unit unavaible for purchase for player", or something like that. I used it in my map.

Or you can make the dummy units trainable, but with this trigger:
  • Trigger
    • Events:
      • Unit - A unit starts training.
    • Conditions:
      • (Unit type of (trained unit)) Equal to (dummy unit)
    • Actions:
      • Unit - Order (training unit) to Stop
      • Set TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 dummy unit at TempPoint facing default building degrees.
      • Custom script: call RemoveLocation(udg_TempPoint)

But im not sure if there exist such event as "A unit starts training". (I dont have w3 right now...)
 
Status
Not open for further replies.
Top