• 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] "-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:
 

NeJiIjEn

N

NeJiIjEn

I mean doing it as an item.
 
Last edited by a moderator:
Level 2
Joined
Sep 11, 2006
Messages
18
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.
 
Level 3
Joined
Dec 24, 2006
Messages
68
use instead of create unit, add item to triggering player unit, dont remember exact action, just look under items in your trigger editor
 
Level 1
Joined
Jul 11, 2006
Messages
6
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.
 
Level 8
Joined
Sep 13, 2006
Messages
431
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.
Top