• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

100 Chances/points for teams (Hero Wars)

Status
Not open for further replies.
Level 5
Joined
Jul 25, 2008
Messages
155
Hello :) I am making a hero wars map, and I was wondering how I do so each team (2 teams) have 100 chances each, and when one unit comes into the region they lose one chance
Would appreciate the help ::wink:
 
  • Chance
    • Events
      • Unit - A unit enters No region
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
        • Then - Actions
          • Set Chance[1] = (Chance[1] - 1)
          • Game - Display to (All players) the text: ((Name of Player 1 (Red)) + has lost one chance)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
            • Then - Actions
              • Set Chance[2] = (Chance[2] - 1)
              • Game - Display to (All players) the text: ((Name of Player 2 (Blue)) + has lost one chance)
            • Else - Actions
Chance is an integer array, with 2.
 
"Set Chance[1] = (Chance[1] - 1)"

How do I do so it becomes -1? I add the variable Chance then i press on the thing inside [] and writes 1, but i cant add -1
 
Okay, listen; Please, view the useful tutorials found in the Tutorials sction on The Hive Workshop Forum Index: 99.9% of all your questions are answered there.

And you don't "press on the thing" in the brackets, you click on the integer value between them and customize it.

And also, don't double-post...
 
I know you do that, but I was wondering how to make it -1
And I already read the tutorials, it didn't help me understand how to make this, I aint very good with variables
 
You just make it "Arithmetic"-type function, then you click on the red text on the left and set it to the integer "Chance[1]". Then, you click on the blue mathematic symbol in the middle and change it to a minus sign: -. Then, you change the blue number on the right to 1.

PRESTO!
 
oh now I understand, it was alot of changing with the arithemtic functions, you had to add several things, but I added it :)
Do you know how do I add 100 chances in the map inizialiting? It would be my last question, after that I'm done with all my triggers :)
 
Oh thank you :x
Now I only need to fix the units and the custom models, and add a hero tavern (which i can add from thehelper tutorial) ^^
 
Status
Not open for further replies.
Back
Top