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

[Trigger] "-Buy Golem" Trigger

Status
Not open for further replies.

NeJiIjEn

N

NeJiIjEn

How do u make a buy trigger. like in one of the sheep tag games there is a -buy golem trigger. How do i do that? I keep thinking of it and found out then i lost it -.-:spell_breaker:
 
I mean doing it as an item.
 
Last edited by a moderator:
Haha, you want to buy a item at a vendor and if you click it u want to summon a golem?

->ZeeRaw<-
 
trigger tags not working sry
Code:
Buy Golem
    Events
        Player - Player 1 (Red) types a chat message containing -buy golem as An exact match
        Player - Player 2 (Blue) types a chat message containing -buy golem as An exact match
        Player - Player 3 (Teal) types a chat message containing -buy golem as An exact match
        etc.
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Triggering player) Current gold) Greater than 250
            Then - Actions
                Player - Add -250 to (Triggering player) Current gold
                Unit - Create 1 Rock Golem for (Triggering player) at (Center of (Playable map area)) facing Default building facing degrees
                Game - Display to (Player group((Triggering player))) for 5.00 seconds the text: You bought a 'Rock ...
            Else - Actions
                Game - Display to (Player group((Triggering player))) for 5.00 seconds the text: Not enough Gold.

Colored version (screenshot)


and what do you mean as an item?
explain a bit more.
 
use instead of create unit, add item to triggering player unit, dont remember exact action, just look under items in your trigger editor
 
use dragoonzombies trigger but for the "then" action do "pick every unit owned by triggering player matching: matching unit is a hero equal to true, and create stone token for picked unit" That should do it.
 
use dragoonzombies trigger but for the "then" action do "pick every unit owned by triggering player matching: matching unit is a hero equal to true, and create stone token for picked unit" That should do it.

Yep. Something like this.


Events
Player - Player 1 (Red) types a chat message containing -buy golem as An exact match
Player - Player 2 (Blue) types a chat message containing -buy golem as An exact match
Player - Player 3 (Teal) types a chat message containing -buy golem as An exact match
Etc.
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player 1 (Red) Current gold) Greater than or equal to Cost
Then - Actions
Unit Group - Pick every unit in (Units owned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
Player - Add (-1 x Cost) to (Triggering player) Current gold
Hero - Create Stone Token and give it to (Picked unit)
Else - Actions
Game - Display to (Player group((Triggering player))) the text: Not enough gold.


Note that Position of Picked Unit will leak, but you can use a variable (in combination with the custom script to remove the point) to eliminate that problem.
 
Last edited:
Status
Not open for further replies.
Back
Top