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
Item Combination System.w3x
Variables
Initialization
Text
The Item Combinations
Without Recipe Without Double
Without Recipe With Double
With Recipe Without Double
With Recipe With Double
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_Count
integer
No
Text
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Game - Display to (All players) for 1000000000.00 seconds the text: Walk around and test the item combinationsThe items is on the ground and the textbeside the items explain what you need
Floating Text - Create floating text that reads Staff of AwsomenessGlue + Useless Staf + Shiny Gem at (Center of Region_000 <gen>) with Z offset 0 , using font size 10 , color ( 100 %, 100 %, 100 %), and 0 % transparency
Floating Text - Create floating text that reads Blade of AwsomenessClaws + Useless Staf + Useless Staf at (Center of Region_003 <gen>) with Z offset 0 , using font size 10 , color ( 100 %, 100 %, 100 %), and 0 % transparency
Floating Text - Create floating text that reads Burning CloakGlue + Cloak + Shiny Gem + Recipe at (Center of Region_002 <gen>) with Z offset 0 , using font size 10 , color ( 100 %, 100 %, 100 %), and 0 % transparency
Floating Text - Create floating text that reads Burning Cloak+ Shiny Gem + Yellow Shield + Shiny Gem + Recipe at (Center of Region_001 <gen>) with Z offset 0 , using font size 10 , color ( 100 %, 100 %, 100 %), and 0 % transparency
Without Recipe Without Double
Events
Unit - A unit Acquires an item
Conditions
Or - Any (Conditions) are true
Conditions
(Item-type of (Item being manipulated)) Equal to Glue
(Item-type of (Item being manipulated)) Equal to Shiny Gem
(Item-type of (Item being manipulated)) Equal to Useless Staff
Actions
-------- If you have made "Events" and "Conditions" right --------
-------- You can go on with the long boring (but not useless) "Actions" --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
((Triggering unit) has an item of type Glue) Equal to True
((Triggering unit) has an item of type Shiny Gem) Equal to True
((Triggering unit) has an item of type Useless Staff) Equal to True
Then - Actions
-------- The extra conditions is for checking that the hero has all required items --------
Item - Remove (Item carried by (Triggering unit) of type Glue)
Item - Remove (Item carried by (Triggering unit) of type Shiny Gem)
Item - Remove (Item carried by (Triggering unit) of type Useless Staff)
-------- remove the required items and make awsome effects --------
Special Effect - Create a special effect attached to the origin (Unexpected type: 'attachpoint') of (Triggering unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
Special Effect - Destroy (Last created special effect)
-------- (i offen use Special effects attached to unit cause it won't make boring leaks and the effect will follow the unit) --------
-------- now only give the item to the unit that has the required items for this "Staff of Awsomeness" --------
Hero - Create Staff of Awsomeness and give it to (Triggering unit)
Else - Actions
Without Recipe With Double
Events
Unit - A unit Acquires an item
Conditions
Or - Any (Conditions) are true
Conditions
(Item-type of (Item being manipulated)) Equal to Claws
(Item-type of (Item being manipulated)) Equal to Useless Staff
Actions
-------- If you have made "Events" and "Conditions" right --------
-------- You can go on with the long boring (but not useless) "Actions" --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
((Triggering unit) has an item of type Claws) Equal to True
((Triggering unit) has an item of type Useless Staff) Equal to True
Then - Actions
Set Variable Set Item_Count = "0"
-------- we need to check if the unit has two of an special item (as required) --------
For each (Integer A) from 1 to 6 , do (Actions)
Loop - Actions
If ((Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Useless Staff) then do (Set VariableSet Item_Count = (Item_Count + 1)) else do (Do nothing)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Item_Count Greater than or equal to 2
Then - Actions
-------- If you done right untill now the Item_Count should have spotted that the unit has 2 of the same (required) items --------
Item - Remove (Item carried by (Triggering unit) of type Useless Staff)
Item - Remove (Item carried by (Triggering unit) of type Useless Staff)
Item - Remove (Item carried by (Triggering unit) of type Claws)
-------- this is not a double type. We just have to remove two of the same items. --------
Special Effect - Create a special effect attached to the origin (Unexpected type: 'attachpoint') of (Triggering unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
Special Effect - Destroy (Last created special effect)
-------- (i offen use Special effects attached to unit cause it won't make boring leaks and the effect will follow the unit) --------
-------- now only give the item to the unit that has the required items for this "Blade of Awsomeness" --------
Hero - Create Blade of Awsomeness and give it to (Triggering unit)
Else - Actions
Else - Actions
With Recipe Without Double
Events
Unit - A unit Acquires an item
Conditions
Or - Any (Conditions) are true
Conditions
(Item-type of (Item being manipulated)) Equal to Glue
(Item-type of (Item being manipulated)) Equal to Shiny Gem
(Item-type of (Item being manipulated)) Equal to Cloak
(Item-type of (Item being manipulated)) Equal to Recipe of Burning Cloak
Actions
-------- If you have made "Events" and "Conditions" right --------
-------- You can go on with the long boring (but not useless) "Actions" --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
((Triggering unit) has an item of type Glue) Equal to True
((Triggering unit) has an item of type Shiny Gem) Equal to True
((Triggering unit) has an item of type Cloak) Equal to True
((Triggering unit) has an item of type Recipe of Burning Cloak) Equal to True
Then - Actions
-------- The extra conditions is for checking that the hero has all required items --------
Item - Remove (Item carried by (Triggering unit) of type Glue)
Item - Remove (Item carried by (Triggering unit) of type Shiny Gem)
Item - Remove (Item carried by (Triggering unit) of type Cloak)
Item - Remove (Item carried by (Triggering unit) of type Recipe of Burning Cloak)
-------- remove the required items and make awsome effects --------
Special Effect - Create a special effect attached to the origin (Unexpected type: 'attachpoint') of (Triggering unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
Special Effect - Destroy (Last created special effect)
-------- (i offen use Special effects attached to unit cause it won't make boring leaks and the effect will follow the unit) --------
-------- now only give the item to the unit that has the required items for this "Burning Cloak" --------
Hero - Create Burning Cloak and give it to (Triggering unit)
Else - Actions
-------- so as you might notes a recipe is just another item that simply does nothing but sets an extra requirement --------
With Recipe With Double
Events
Unit - A unit Acquires an item
Conditions
Or - Any (Conditions) are true
Conditions
(Item-type of (Item being manipulated)) Equal to Yellow Shiled
(Item-type of (Item being manipulated)) Equal to Shiny Gem
(Item-type of (Item being manipulated)) Equal to Recipe of Lightning Shield
Actions
-------- If you have made "Events" and "Conditions" right --------
-------- You can go on with the long boring (but not useless) "Actions".. again. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
((Triggering unit) has an item of type Recipe of Lightning Shield) Equal to True
((Triggering unit) has an item of type Yellow Shiled) Equal to True
((Triggering unit) has an item of type Shiny Gem) Equal to True
Then - Actions
Set Variable Set Item_Count = "0"
-------- we need to check if the unit has two of an special item (as required) --------
For each (Integer A) from 1 to 6 , do (Actions)
Loop - Actions
If ((Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Shiny Gem) then do (Set VariableSet Item_Count = (Item_Count + 1)) else do (Do nothing)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Item_Count Greater than or equal to 2
Then - Actions
-------- If you done right untill now the Item_Count should have spotted that the unit has 2 of the same (required) items --------
Item - Remove (Item carried by (Triggering unit) of type Yellow Shiled)
Item - Remove (Item carried by (Triggering unit) of type Shiny Gem)
Item - Remove (Item carried by (Triggering unit) of type Shiny Gem)
Item - Remove (Item carried by (Triggering unit) of type Recipe of Lightning Shield)
-------- this is not a double type. We just have to remove two of the same items. --------
Special Effect - Create a special effect attached to the origin (Unexpected type: 'attachpoint') of (Triggering unit) using Abilities\Weapons\Bolt\BoltImpact.mdl
Special Effect - Destroy (Last created special effect)
-------- (i offen use Special effects attached to unit cause it won't make boring leaks and the effect will follow the unit) --------
-------- now only give the item to the unit that has the required items for this "Blade of Awsomeness" --------
Hero - Create Lightning Shiled and give it to (Triggering unit)
Else - Actions
Else - Actions
-------- so as you might notes a recipe is just another item that simply does nothing but sets an extra requirement --------
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.