• 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] Not remove unit type from martket.

Status
Not open for further replies.
Level 14
Joined
Aug 23, 2013
Messages
285
  • Events
  • Unit - A Unit Sells a Unit
  • Conditions
  • ((Sold unit) is A Hero) Equal to True
  • Actions
  • Set TempUnit1 = (Sold unit)
  • Set TempPlayer = (Owner of TempUnit1)
  • Set TempTypeUnit1 = (Unit-Type of TempUnit1)
  • Neutral Building - Remove TempTypeUnit1 from all marketplaces
  • Unit - Move TempUnit1 to ReviveTowerLoc
 
Last edited:
Level 20
Joined
Aug 13, 2013
Messages
1,696
Use jass tags as Rheiko said. Anyway what do you want in this trigger????*. Read this tutorial made by dimf (deathismyfriend) Converting GUI to Efficient JASS because seems your jass trigger scripting is inefficient so you must read this tutorial. Why not use locals in JASS so that you don't need to write "udg_blabla" xD. This will not working.. Where did you set the " udg_ReviveTowerLoc " ??
 
Level 2
Joined
Sep 23, 2013
Messages
18
I'm having the same problem actually, I made a unit "Footman"
The building selling would be a barracks of player(blue)[computer]
My hero, would then buy the unit.
The unit should be removed from the barracks. But does not happen.
Or am I missing something?

My triggers are basically
Unit sells a unit
Unit-type of sold unit is equal to footman
Make footman unavailable for training
 
Level 2
Joined
Sep 23, 2013
Messages
18
  • Footman Start
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Sold unit)) Equal to Footman Level 1
    • Actions
      • Set defnum_footman = (defnum_footman + 1)
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Make Footman Level 1 Unavailable for training/construction by (Picked player)
      • Game - Display to (All players) the text: ((Player_Colors[(Player number of (Owner of (Sold unit)))] + (Name of (Owner of (Sold unit)))) + (Player_Colors[13] + ( has bought + (Name of (Sold unit)))))
      • Unit - Remove (Sold unit) from the game
That's what I have, the building selling the unit is Player 2 (Controlled by Computer)
The aim is that if any of the players bought the unit, it would be unavailable as it is a one time global purchase.. or am i going about this wrong? is there a better way to configure what i'm trying to do?

Also, sorry if i'm hi jacking the thread as it did not occur to me to post a new topic about this same topic and to my dismay, I cannot find any related posts to my question (at least that's what google says).
 
Status
Not open for further replies.
Top