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!
You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser.
Triggers
Stop Selling System 1.06.w3x
Variables
(you dont need triggers in this folder)
Map Initialization for map
Stop selling item-type to hero-type
( How to copy )
just for game text 1
just for game text 2
STOP SELLING ITEM TYPE
UNSTOP selling item type
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.
Name
Type
is_array
initial_value
ITEM
itemcode
No
NotAllowedHeroes
group
No
TIMER
timer
No
Map Initialization for map
Events
Map initialization
Conditions
Actions
Player - Set Player 1 (Red) . Current gold to 888888
Player - Set Player 1 (Red) . Current lumber to 888888
Player - Set Player 1 (Red) . Food cap to 888888
Game - Display to (All players) for 999.00 seconds the text: -read hero´s names to see what hero can or can´t buy-you cannot buy from Player 5´s shop ( it just proves that conditions can work for players too)
How to copy:
just copy and pase from map to map without closeing the editor (so do it by Ctrl + O or go to File > Open Map...)
you can copy the whole folder too
you can alos go to
File > Preferences... > Automatickly create unknown variables while pasting trigger data (set it to true)
just for game text 1
Events
Map initialization
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Trigger - Add to just_for_game_text_2 <gen> the event ((Picked player) Selects a unit)
-------- TRIGGER INFO: --------
-------- This trigger will add events needed to "game text warning when shop is selected" trigger --------
just for game text 2
Events
Conditions
(Level of Select Hero for (Triggering unit)) Equal to 1
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 5 (Yellow)
Then - Actions
Game - Display to (Player group((Triggering player))) for 5.00 seconds the text: You cannot buy items in Player 5´s shop!
Else - Actions
Game - Display to (Player group((Triggering player))) for 5.00 seconds the text: Your hero may be unable to buy some items from this shop!
-------- TRIGGER INFO: --------
-------- This needs to be done when player selects a shop --------
STOP SELLING ITEM TYPE
Events
Unit - A unit Is issued an order with no target
Conditions
(Level of Select Hero for (Triggering unit)) Equal to 1
Actions
Custom script: set udg_ITEM = (GetIssuedOrderId())
-------- first we set this group for all heroes --------
Set Variable Set NotAllowedHeroes = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
-------- here,heroes that can buy the item can be removed from "NotAllowedHeroes" group --------
-------- this all conditions will need to be changed to your own needs --------
Unit Group - Pick every unit in NotAllowedHeroes and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is selected by (Owner of (Picked unit)).) Equal to True
Or - Any (Conditions) are true
Conditions
And - All (Conditions) are true
Conditions
(Unit-type of (Picked unit)) Equal to Nut,i want NUT !,
ITEM Not equal to Nut
And - All (Conditions) are true
Conditions
(Unit-type of (Picked unit)) Equal to I wanna Cheese
ITEM Not equal to Cheese
And - All (Conditions) are true
Conditions
(Unit-type of (Picked unit)) Equal to Just dont give me Cheese
ITEM Equal to Cheese
And - All (Conditions) are true
Conditions
(Unit-type of (Picked unit)) Equal to give me a weapon from my shop
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Not equal to (Owner of (Picked unit))
And - All (Conditions) are true
Conditions
ITEM Not equal to Sword
ITEM Not equal to Axe
(Owner of (Triggering unit)) Equal to Player 5 (Yellow)
Then - Actions
-------- this picked unti is not allowed to buy the item,his inventory will be "disabled" --------
Unit - Set level of Inventory [Hero,has 2 levels] for (Picked unit) to 2
Else - Actions
-------- this picked unit is allowed to buy the item,he can be removed from the group --------
Unit Group - Remove (Picked unit) from NotAllowedHeroes .
Countdown Timer - Start TIMER as a One-shot timer that will expire in 0.00 seconds
-------- you cannot detect player that wants to buy item from shop (this is bad only because you cannot send text massage to player when buying) --------
-------- you cannot detect unit that wants to buy item from shop (this is bad only because you cannot send text massage to player when buying) --------
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.