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

Add to variables

Status
Not open for further replies.
Level 13
Joined
Jun 10, 2007
Messages
780
  • Tests
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Killing unit)) Equal to (Random player from (All allies of Player 1 (Red)))
    • Actions
      • Set Team1 = (1.00 + 1.00)
How do i make it add 1 to the current number (Team1)
Example: Player gets a kill so the variable is one. He gets another kill and the variable gets a +1 meaning 2.
 
Level 8
Joined
Dec 29, 2006
Messages
359
Well, i dont have WE in front of me right now, but ill try to explain the trigger best i can without it.
Instead of doing
Actions: Set Team1 = 1.00 + 1.00

use the algebra function and do

Actions: Set Team1 = (Team1) + 1.00
 
Level 10
Joined
Jan 21, 2007
Messages
576
Your triggers conidition is flawed, your condition picks a random ally of player 1 red, and if it HAPPENS to be the one that actualy killed the unit then it will work, but it could pick player blue, when teal killed it, and it would add to the kills. This should be your trigger:


  • Scoreboard
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) belongs to an ally of Player 1 (Red)) Equal to True
    • Actions
      • Set Team1 = (Team1 + 1)
(This condition is found under the condition section > Boolean.)
 
Status
Not open for further replies.
Top