• 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.

Request: Dig Trigger

Status
Not open for further replies.
Level 2
Joined
Jun 5, 2013
Messages
30
Hello
I want to request a trigger for my map: If a unit finish casting an (X) ability in a specific area or region (Y) the owner of the unit will recive (Z) Gold.
(Optional):
If the player use the (X) in the specific region display a message : "..."
If not:"..."
===================================
X= The ability: Like Roar
Y=A random region
Z=The amount of the gold
...= A text
:ogre_hurrhurr::ogre_hurrhurr:
===================================
The person who did it, will be added his hiveworkshop's name at begin of the map.
Thanks
 
Last edited:

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
  • Melee Initialization
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Player - Add 50 to (Owner of (Triggering unit)) Current gold
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (your_region contains (Triggering unit)) Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: msg 1
        • Else - Actions
          • Game - Display to (All players) the text: msg 2
 
Level 2
Joined
Jun 5, 2013
Messages
30
Thx so much , ill try it.
1 thing more : the condition : (your_region contains (Triggering unit)) Equal to True ,is... like ability or boolean comparision
Sorry i dont know about Triggers :D
 
Level 2
Joined
Jun 5, 2013
Messages
30
Ok, its done, works properly but , i want a thing more, can you do, that after do this command , to disable it, like , you discover the treasure only once.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
exactly, that's why I think it's pretty stupid if I would turn off the trigger when one treasure is found.
dont think like this like you request something "hm that maybe is hard" just say what you want.

this is what I guess you want.
you can dig at certain regions to find treasure.
if one is found you cant re-find it.

however I think you want more than that.
do you want the treasure ammout to be constant, when I find a treasure a new one should be placed at a random location
the gold ammout you get should be random
maybe it should give lumber and items too.

allways be very specific please-
 
Level 2
Joined
Jun 5, 2013
Messages
30
Well , i want to use the Y at a specificly point and then unable to find it again in that point.
Can you do that?
And the ammount of the treasure to be constant.
(There are multiple points)
If you cant with multiple points it can be only one.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Dig_locations[1] = (Random point in (Playable map area))
      • Set Dig_locations[2] = (Random point in (Playable map area))
      • Set Dig_locations[3] = (Random point in (Playable map area))
      • Set index = 3
  • ability is cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Set temp_loc = (Position of (Triggering unit))
      • For each (Integer A) from 1 to index, do (Actions)
        • Loop - Actions
          • Set distance = (Distance between Dig_locations[(Integer A)] and temp_loc)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • distance Less than or equal to 100.00
              • check[(Integer A)] Equal to False
            • Then - Actions
              • Game - Display to (All players) the text: You've found someth...
              • Set check[(Integer A)] = True
              • Player - Add (Random integer number between 1 and 100) to Player 1 (Red) Current gold
            • Else - Actions
 
Level 2
Joined
Jun 5, 2013
Messages
30
Ok , just tell me the Variables and ill try it.
Only tell me DigLocation= ? variable , and if it is array or not
Well, that points are rendomly, but , i want to be specific like in 3 specific points Regions X , Y , Z.
 
Last edited:
Status
Not open for further replies.
Top