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
HowtoCombine.w3x
Variables
Initialization
Setvariable
Visible
Combine Trigger
Readme
RandomNumberTower
Player1Select
Checktypeunit
Addcombineicon
Combine
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
Combine_number
integer
Yes
Combine_result
integer
No
maxselect
integer
No
maxselectloop
integer
No
rannum
integer
No
unit
unit
Yes
Setvariable
Events
Map initialization
Conditions
Actions
Set Variable Set maxselect = "2"
Set Variable Set maxselectloop = "1"
Set Variable Set Combine_number[1] = "5"
Set Variable Set Combine_number[2] = "5"
Visible
Events
Map initialization
Conditions
Actions
Visibility - Disable fog of war
For how to Combine it is create by Vern(Thailand) if you found bug it is system of me not bug :)
Description
Combine max is 2 : you will need to select 2 NumberTower(s) for combine Only.
If you select 1 NumberTower you will never Combine it.
Base of Combine = '1','2' : Base of Combine is a ingredient of Combine Unit.
Max NumberTower is 4 : '1' + '1' = '2' and '1' + '2' = '3' and '1' + '3' = '4' and '2' + '2' = '4'
*If you want to NumberTower '3' and '4' you will have only by Combine '1' + '2' = '3' and '2' + '2' = '4'
**If you have question please sent E-Mail to [email protected]
RandomNumberTower
Events
Unit - A unit Finishes construction
Conditions
(Unit-type of (Triggering unit)) Equal to Random Number
Actions
Set Variable Set rannum = (Random integer number between 1 and 2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
rannum Equal to 1
Then - Actions
Unit - Replace (Triggering unit) with a 1 using The old unit's relative life and mana
Else - Actions
Unit - Replace (Triggering unit) with a 2 using The old unit's relative life and mana
Player1Select
Events
Player - Player 1 (Red) Selects a unit
Conditions
Actions
Set Variable Set unit[maxselectloop] = (Triggering unit)
Trigger - Run Checktypeunit <gen> (ignoring conditions)
Trigger - Run Addcombineicon <gen> (ignoring conditions)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
maxselectloop Equal to maxselect
Then - Actions
Set Variable Set maxselectloop = "1"
Else - Actions
Set Variable Set maxselectloop = (maxselectloop + 1)
Checktypeunit
Events
Conditions
Actions
Game - Display to (All players) the text: Enter Checktypeunit
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to 1
Then - Actions
Set Variable Set Combine_number[maxselectloop] = "1"
Game - Display to (All players) the text: It is 1
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to 2
Then - Actions
Set Variable Set Combine_number[maxselectloop] = "2"
Game - Display to (All players) the text: It is 2
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to 3
Then - Actions
Set Variable Set Combine_number[maxselectloop] = "3"
Game - Display to (All players) the text: It is 3
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to 4
Then - Actions
Set Variable Set Combine_number[maxselectloop] = "4"
Game - Display to (All players) the text: It is 4
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Not equal to 1
(Unit-type of (Triggering unit)) Not equal to 2
(Unit-type of (Triggering unit)) Not equal to 3
(Unit-type of (Triggering unit)) Not equal to 4
Then - Actions
Set Variable Set Combine_number[maxselectloop] = "5"
Game - Display to (All players) the text: It not 1-4
Else - Actions
Addcombineicon
Events
Conditions
Actions
Game - Display to (All players) the text: Enter Addcombineicon
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
unit[1] Not equal to unit[2]
(Combine_number[1] + Combine_number[2]) Less than 5
Then - Actions
Unit - Add Combine to (Triggering unit)
Game - Display to (All players) the text: (Click Icon to combine ' + ((String((Combine_number[1] + Combine_number[2]))) + '))
Game - Display to (All players) the text: ==========
Else - Actions
Unit - Remove Combine from (Triggering unit)
Game - Display to (All players) the text: Remove Icon
Game - Display to (All players) the text: ==========
Combine
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Combine
Actions
Game - Display to (All players) the text: Enter Combine
Set Variable Set Combine_result = (Combine_number[1] + Combine_number[2])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Combine_result Equal to 2
Then - Actions
Unit - Replace (Triggering unit) with a 2 using The old unit's relative life and mana
Unit - Remove unit[1] from the game
Unit - Remove unit[2] from the game
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Combine_result Equal to 3
Then - Actions
Unit - Replace (Triggering unit) with a 3 using The old unit's relative life and mana
Unit - Remove unit[1] from the game
Unit - Remove unit[2] from the game
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Combine_result Equal to 4
Then - Actions
Unit - Replace (Triggering unit) with a 4 using The old unit's relative life and mana
Unit - Remove unit[1] from the game
Unit - Remove unit[2] from the game
Else - Actions
Trigger - Run Setvariable <gen> (ignoring conditions)
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.