• 🏆 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!

Creep help (displaying how many a player owns)

Status
Not open for further replies.
Level 5
Joined
Nov 2, 2008
Messages
48
Hi, i making a Circle Defense and i need some help.

There are 4 players that defend a circle from creeps, if they are more then 60 creeps in it so will you lose.

My problem is, i want anything so i can see how menny creeps that player 10(creeper) owns

Im using food, when player 10s food limit become more then 60 all lose (1 food per creep)
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
I think this should solve your problem...

  • a
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Picked unit)) Equal to Player 10 (Light Blue)
            • Then - Actions
              • Set Counter = (Counter + 1)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Counter Greater than or equal to 60
        • Then - Actions
          • End Game
        • Else - Actions
          • Set Counter = 0
 
Level 9
Joined
Apr 3, 2008
Messages
700
You can convert any integer to reals and strings.
When you use strings you see 2 red inscriptions: String1 + String2. A bit higher you see "Concentrate strings." Click on it and choose "Conversion - Convert integer to string." (In WEU it's 4th raw)
 
Status
Not open for further replies.
Top