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

[Trigger] mining, supposed problem

Status
Not open for further replies.
Level 6
Joined
Apr 16, 2011
Messages
158
[Resolved]mining, supposed problem

Good galley, I was following this tutorial on professions:

http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=89665

I managed to do to work, however I get "mining" a material type, I leave my triggers and a test map here.
Is my question, this certain? No? which the problem?

  • 1
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Melee Game - Use melee time of day (for all players)
      • Visibility - Disable fog of war
      • Visibility - Disable black mask
      • Set Mining_Level = 0
      • Set Cobre = Copper
      • Set Ferro = Iron
      • Set Ouro = Gold
  • 2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Gold Mine
    • Actions
      • Item - Create Cobre at (Position of (Dying unit))
  • 3
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Mineração
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Target unit of ability being cast)) Equal to Gold Mine
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 0 and 10) Greater than 7
            • Then - Actions
              • Unit - Kill (Target unit of ability being cast)
              • Set Mining_Level = (Mining_Level + 1)
              • Game - Display to (All players) the text: ((String(Mining_Level)) + is your level of mining)
            • Else - Actions
              • Game - Display to (Player group((Owner of (Casting unit)))) the text: you failed in mini...
        • Else - Actions
          • Do nothing
  • 4
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Mineração
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Casting unit) is A structure) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 10) Greater than 7
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Random integer number between 1 and 10) Greater than 9
                • Then - Actions
                  • Item - Remove (Item carried by (Casting unit) of type Cobre)
                  • Item - Create Ouro at (Position of (Casting unit))
                  • Set Mining_Level = (Mining_Level + 5)
                  • Game - Display to (All players) the text: ((String(Mining_Level)) + is your level of mining)
                • Else - Actions
                  • Item - Remove (Item carried by (Casting unit) of type Cobre)
                  • Item - Create Ferro at (Position of (Casting unit))
                  • Set Mining_Level = (Mining_Level + 3)
                  • Game - Display to (All players) the text: ((String(Mining_Level)) + is your level of mining)
            • Else - Actions
              • Item - Remove (Item carried by (Casting unit) of type Cobre)
              • Item - Create Cobre at (Position of (Casting unit))
              • Set Mining_Level = (Mining_Level + 1)
              • Game - Display to (All players) the text: ((String(Mining_Level)) + is your level of mining)
        • Else - Actions
          • Do nothing
Thank you for you help. :goblin_good_job:
 

Attachments

  • mining.w3x
    13.9 KB · Views: 48
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Next to exibiting some routine coupling, what is the problem? You have not told us what problem you are having.

Do nothing does nothing, avoid using it. It compiles to an empty function call so serves no purpose at all next to the old RoC GUI flow control structures.
 
Level 6
Joined
Apr 16, 2011
Messages
158
there was a wrong trigger...something that I was not managing to do and I left to redo...
even so thank you

4
((Casting unit) is A structure) Equal to True (Wrong)

((Casting unit) has an item of type Unidentified Ore) Equal to True (correct)
 
Last edited:
Level 6
Joined
Apr 16, 2011
Messages
158
well, I have been using reverse. translating net my language is Portuguese, Brazilian, I believe that is really difficult of finding somebody of the brasil in the hiveworkshop...
Even so still I can count some people that make an effort to help...thank you
 
Status
Not open for further replies.
Top