• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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