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
Dig System.w3x
Variables
Dig System
Description
DigInit
DigLoop
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
Dig_Chance
real
No
Dig_Item
itemcode
Yes
Dig_MaxItems
integer
No
Dig_Position
location
No
Dig_Tile
terraintype
No
Dig_Unit
unit
No
Dig_UseSpecificTile
boolean
No
X-OMG-X's
DIG SYSTEM
__________________________________________________________________________________________________________________________________________________________________
How to use:
Move your unit to a position with dirt.
Use the 'dig' abillity.
If you are lucky enought to find something, you will get an item.
About this system:
This is just an easy system i made for a request.
It do only contain 2 triggers and is very configureable and easy to read.
There are commented on most of the actions to make it easy to understand for everybody.
This system is MUI, leakless, laggless and bugless.
Copyright:
This system is made by me and all credits goes to X-OMG-X.
Do not distribute this system to any other sites.
Give credits if used.
Now i dont have anything else to say than, enjoy!
DigInit
Events
Map initialization
Conditions
Actions
-------- --------
-------- X-OMG-X's --------
-------- --------
-------- Dig System --------
-------- --------
-------- --------
-------- Here you can set the items that have a chance to be digged up --------
-------- If you want more than 10 items, just increase the array --------
-------- --------
Set Variable Set Dig_Item[1] = "belv"
Set Variable Set Dig_Item[2] = "ofro"
Set Variable Set Dig_Item[3] = "rde4"
Set Variable Set Dig_Item[4] = "ankh"
Set Variable Set Dig_Item[5] = "ratc"
Set Variable Set Dig_Item[6] = "sbch"
Set Variable Set Dig_Item[7] = "shas"
Set Variable Set Dig_Item[8] = "wlsd"
Set Variable Set Dig_Item[9] = "clfm"
Set Variable Set Dig_Item[10] = "prvt"
Set Variable Set Dig_MaxItems = "10"
-------- --------
-------- This is the chance to get one of the items above --------
-------- --------
Set Variable Set Dig_Chance = "30.00"
-------- --------
-------- If the unit have to be on a specific tile to dig, set this to true --------
-------- --------
Set Variable Set Dig_UseSpecificTile = "true"
-------- --------
-------- If Dig_UseSpecificTile is set to true, you can set the tile here --------
-------- --------
Set Variable Set Dig_Tile = Ashenvale - Rough Dirt
DigLoop
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Dig
Actions
-------- --------
-------- EDITING ANYTHING BELOW THIS LINE CAN CAUSE THE SYSTEM TO NOT WORK --------
-------- --------
Set Variable Set Dig_Unit = (Triggering unit)
Set Variable Set Dig_Position = (Position of Dig_Unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Dig_UseSpecificTile Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain type at Dig_Position) Equal to Dig_Tile
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random real number between 0.00 and 100.00) Less than or equal to Dig_Chance
Then - Actions
Item - Create Dig_Item[(Random integer number between 1 and Dig_MaxItems)] at Dig_Position
Game - Display to (All players matching ((Owner of Dig_Unit) Equal to (Matching player)).) for 5.00 seconds the text: (You found: + (Name of (Last created item)))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Size of inventory for Dig_Unit) Greater than 0
Then - Actions
Hero - Give (Last created item) to Dig_Unit
Else - Actions
Else - Actions
Game - Display to (All players matching ((Owner of Dig_Unit) Equal to (Matching player)).) for 5.00 seconds the text: You didnt find anything!
Else - Actions
Game - Display to (All players matching ((Owner of Dig_Unit) Equal to (Matching player)).) for 5.00 seconds the text: Only useable on Dirt!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random real number between 1.00 and 100.00) Less than or equal to Dig_Chance
Then - Actions
Item - Create Dig_Item[(Random integer number between 1 and Dig_MaxItems)] at Dig_Position
Game - Display to (All players matching ((Owner of Dig_Unit) Equal to (Matching player)).) for 5.00 seconds the text: (You found: + (Name of (Last created item)))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Size of inventory for Dig_Unit) Greater than 0
Then - Actions
Hero - Give (Last created item) to Dig_Unit
Else - Actions
Else - Actions
Game - Display to (All players matching ((Owner of Dig_Unit) Equal to (Matching player)).) for 5.00 seconds the text: You didnt find anything!
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.