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

[Trigger] Three Problems

Status
Not open for further replies.
Level 5
Joined
Apr 24, 2007
Messages
90
1. I finished my multiboard not long ago and it works perfectly. Except theres no divider betweeen team1 and 2 and team 1 and 2 kills and deaths. Can some1 tell me how to do this.

2. (This is realted to first one sorta) I dont know how to make it so that when one team scores enough points the game is over.

3. (Ok there all related to eachother) How would I make it so that red player can change the kill limit.

Im not sure but this could be JASS to. Im not sure what kind of trigger this is. It will probally be moved.
 
Level 18
Joined
May 27, 2007
Messages
1,689
well i am unsure about the multiboard problem but i think i have some answers for the second question and somewhat of an idea on the third to make someone win after they have a certain amount of kills do this

  • Kills
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Set UnitsKilled = (Player 1 (Red) Units Killed)
      • Set KillLimit = 10
      • Wait until (UnitsKilled Greater than or equal to KillLimit), checking every 0.20 seconds
      • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
For the third one you would need the event to be an entered chat and someone set the variably "KillLimit" = to the integer entered which i cant seem to figure out BTW that trigger probably leaks
 
Level 18
Joined
May 27, 2007
Messages
1,689
ok instead of setting kills to that of player one you could go
  • Actions
    • Set UnitsKilled = ((((Player 1 (Red) Units Killed) + (Player 2 (Blue) Units Killed)) + (((Player 3 (Teal) Units Killed) + (Player 4 (Purple) Units Killed)) + ((Player 5 (Yellow) Units Killed) + (Player 6 (Orange) Units Killed)))) + 0)
it will be tedious but i think it should work right
 
Level 21
Joined
Jan 5, 2005
Messages
3,515
Problem 1.

  • Actions
    • Multiboard - Create a multiboard with 2 columns and 1 rows, titled Kills
    • For each (Integer A) from 1 to 6, do (Multiboard - Set the text for (Last created multiboard) item in column 1, row (Integer A) to (String(((Player((Integer A))) Units Killed))))
    • For each (Integer A) from 1 to 6, do (Multiboard - Set the text for (Last created multiboard) item in column 2, row (Integer A) to (String(((Player(((Integer A) + 6))) Units Killed))))
IMPORTANT - add the + 6 to the second one or you wont ger players 7-12 in the second column. also you will have to add the total kills youself using the variable famouspker49 posted above. also you will obviously need to tweak this to your needs, with a 4 more coloumn, player names team1, deaths team, names team 2, deaths team 2.

Problem 2

instead of using "Wait until (UnitsKilled Greater than or equal to KillLimit), checking every 0.20 seconds" as said in the first reply (dont use the trigger in the first reply it doesnt work) use:

(get ready for this...its a long one!)

  • Oh Noes
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Set Team1Kills= (((Player 1 (Red) Units Killed) + (Player 2 (Blue) Units Killed)) + (((Player 3 (Teal) Units Killed) + (Player 4 (Purple) Units Killed)) + ((Player 5 (Yellow) Units Killed) + (Player 6 (Orange) Units Killed))))
      • Set Team2Kills = (kills of all players from 7-12 as shown above)
      • For each (Integer A) from 1 to 6, do (Multiboard - Set the text for (Last created multiboard) item in column 1, row (Integer A) to (String(((Player((Integer A))) Units Killed))))
      • For each (Integer A) from 1 to 6, do (Multiboard - Set the text for (Last created multiboard) item in column 2, row (Integer A) to (String(((Player(((Integer A) + 6))) Units Killed))))
      • Player Group - Pick every player in (All allies of Player 1 (Red)) and do (If (Team1Kills Greater than or equal to GameOverKills) then do (Game - Victory (Picked player) (Show dialogs, Show scores)) else do (If (Team2Kills Greater than or equal to GameOverKills) then do (Game - Defeat (Picked player) with the message: Defeat!) else (Do Nothing)
      • Player Group - Pick every player in (All allies of Player 7 (Green)) and do (If (Team2Kills Greater than or equal to GameOverKills) then do (Game - Victory (Picked player) (Show dialogs, Show scores)) else do (If (Team1Kills Greater than or equal to GameOverKills) then do (Game - Defeat (Picked player) with the message: Defeat!) else (Do Nothing)
hopefully you can see how that works....you can shorten it and change it, that basic idea is compare Team1Kills to Gameoverkill, Compare Team2Kills to Gameoverkills, if one is greaterthan or equal to gamoverkills show that team win, show other team lose.

as for Problem 3, well i know it can be done, but im not sure how to seperate the command activator, e.g /setkills or .Winkills and the numerical input so only the numerical input can be registered.
 
Last edited:
Level 5
Joined
Apr 24, 2007
Messages
90
Dont mean to bug you but im not that smart so im going to give you a better description of my multiboaqrd so you can give me a trigger that works for tht.
  • Create Multiboard
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Set Player_Count = (Number of players in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing))))
      • Multiboard - Create a multiboard with 5 columns and (1 + Player_Count) rows, titled Car Status
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Player Name
      • Multiboard - Set the text for (Last created multiboard) item in column 5, row 1 to Deaths
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to Health
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row 1 to Kills
      • For each (Integer A) from 1 to (1 + Player_Count), do (Actions)
        • Loop - Actions
          • Multiboard - Set the display style for (Last created multiboard) item in column 1, row 1 to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 1, row (Integer A) to Show text and Show icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 2, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 3, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 4, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 5, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 2.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 8.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 3, row (Integer A) to 4.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 4, row (Integer A) to 3.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 5, row (Integer A) to 3.20% of the total screen width
      • Set List = 2
      • Player Group - Pick every player in (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User))) and do (Actions)
        • Loop - Actions
          • Set Multiboard_Spots[(Player number of (Picked player))] = List
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row List to ReplaceableTextures\CommandButtons\BTNWisp.blp
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row List to (Player_Colors[(Player number of (Picked player))] + ((Name of (Picked player)) + |r))
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row List to 0
          • Set List = (List + 1)
      • Multiboard - Show (Last created multiboard)
Its a very complicated multi board i know. So all I need to yo to do is to tell me the triggers I need. Also a side note there is only 8 players and the teams are =.
 
Level 21
Joined
Jan 5, 2005
Messages
3,515
it would have been useful for you to post this tirgger at the start lol! that multiboard looks good tho. coloumns arent divided by a line or anything normally as far as i know, im not sure i havent made one in a long time. have you actually seen examples of multiboards with divinding lines? perhaps you could make a dividing line making a column with this on every row:

|
|
|
|

btw, have you made your trigger to automattically update the leaderboard and compare the scores?
 
Level 3
Joined
May 28, 2007
Messages
57
  • Deaths
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (((Dying unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True) and (((Killing unit) belongs to an ally of Player 1 (Red)) Equal to True)
        • Then - Actions
          • Multiboard - Set the text for (Last created multiboard) item in column whicheva is the number, row (Integer A) to (String((Team1Kills + 1)))
        • Else - Actions
          • Multiboard - Set the text for (Last created multiboard) item in column whicheva is the number, row (Integer A) to (String((Team2Kills + 1)))
I think this is how you can set up the total deaths for each team.
 
Last edited by a moderator:
Level 21
Joined
Jan 5, 2005
Messages
3,515
depending on how many units are killed at once, you can intergrate the team kills with the multiboard update to maximise efficiency and minimise the number of triggers needs. E.g:

  • Oh Noes
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Set Team1Kills= (((Player 1 (Red) Units Killed) + (Player 2 (Blue) Units Killed)) + (((Player 3 (Teal) Units Killed) + (Player 4 (Purple) Units Killed)) + ((Player 5 (Yellow) Units Killed) + (Player 6 (Orange) Units Killed))))
      • Set Team2Kills = (kills of all players from 7-12 as shown above)
      • Multiboard - Update Multiboard with text and all that.
basically, while your trigger will work, depending on how many units are being killed at once it will update the multiboard unnessecceraly often, for example on a hero line wars map it would be updated so often that it may lag. if however you are using it on a m,ap where units are killed as regularly, that system would work well.
 
Last edited by a moderator:
Level 5
Joined
Apr 24, 2007
Messages
90
OK ya you wanna know my secret. There is this turtorial map on multiboards and I just copied all of it and paste on my own map made the varibles and done. It works perfectly though it updates it and everything but i just coldnt figure out how to seperate it into teams. (Its not plagrism because he gave a online turtorial to copy it exactly for your own map)

Heres the other parts;
  • Player Kills Update
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Owner of (Killing unit)) controller) Equal to User
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Kill_Count[(Player number of (Owner of (Killing unit)))] = (Kill_Count[(Player number of (Owner of (Killing unit)))] + 1)
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row Multiboard_Spots[(Player number of (Owner of (Killing unit)))] to (String(Kill_Count[(Player number of (Owner of (Killing unit)))]))
      • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( Killed + (Name of (Owner of (Triggering unit)))))
  • Player hp update
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If ((((Owner of (Picked unit)) controller) Equal to User) and (((Unit-type of (Picked unit)) is A Hero) Equal to True)) then do (Multiboard - Set the text for (Last created multiboard) item in column 3, row Multiboard_Spots[(Player number of (Owner of (Picked unit)))] to ((String((Integer((Percentage life of (Picked unit)))))) + %)) else do (Do nothing)
  • Player Deaths Update
    • Events
      • Unit - A unit Dies
    • Conditions
      • (((Triggering unit) is A Hero) Equal to True) and (((Owner of (Dying unit)) controller) Equal to User)
    • Actions
      • Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
      • Multiboard - Set the text for (Last created multiboard) item in column 5, row Multiboard_Spots[(Player number of (Owner of (Dying unit)))] to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
  • Player Attacked
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (((Attacked unit) is A Hero) Equal to True) and (((Owner of (Attacked unit)) controller) Equal to User)
    • Actions
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row Multiboard_Spots[(Player number of (Owner of (Attacked unit)))] to ((String((Integer((Percentage life of (Attacked unit)))))) + %)
One more thing what are the varibles (if needed) for teams?
 
Last edited by a moderator:
Level 5
Joined
Apr 24, 2007
Messages
90
Well I dont know how to use paint files on this so heres my best shot.
Car Status /\
Player Name Health Kills Death
D_man3981 100% 1 0
World edit 100% 0 1
Thats wat it looks like now

Car Status /\
Player Name Health Kills Death
Team1 0 1 0
D_man3981 100% 1 0
Team2 0 0 1
World edit 100% 0 1
This is wat i want it to look like. Its a little of becasue of the spacing thing.
 
Level 18
Joined
May 27, 2007
Messages
1,689
what you do is you take a screenshot if you dont know how to do that its the "Print Screen|SysReq" button then you take it to paint or w/e program like that you have and you just hit paste then you can save it and there is the screenie that you are looking for then when you post "Go To Advanced" and you can go to "Manage Attachtments" and find your file where ever you saved it or you could upload it to a different site that can host images and then click on "Insert Image" and paste the URL of the location of your image but personally i would recommend that you do the first way.
 
Level 21
Joined
Jan 5, 2005
Messages
3,515
rrright for this you gotta edit the fundements of your multiboard. i can fix this for you but it would be easier if you were to attach the map and i changed it for you directly then describing the triggers because its quite a big change. would you be ok with doing this?

ooooh man u got so many triggers for you multiboard...this is gunna take ages to fix..


...im considering re-writing the whole multiboard because its based on variables where every player, no matter what team they are on, are grouped under one single variable. what i have to do is split up each variable for team 1 and team 2 then add 2 to the variable for team one to accomidate for the first two rows and for team 2 i have to add the first variable + 3 to accomidate for the amount of player on team 1 and the first two rows and the team 2 title....even im getting confused by it.

oh btw, i have found how to set the kills required:

  • Skip to Level
    • Events
      • Player - Player 1 (Red) types a chat message containing -Kills as A substring
    • Conditions
    • Actions
      • Set KillsToWin = (Integer((Substring((Entered chat string), 8, 11))))
      • Game - Display to (All players) the text: (Kills Required + (Substring((Entered chat string), 8, 11)))
 
Last edited by a moderator:
Level 21
Joined
Jan 5, 2005
Messages
3,515
k, i might be able to get it done today....ill add in the player red set kills trigger too.

i noticed a few things wrong with your multiboard triggers whcih im going to fix also.

ok i finished it, do u want me to attach it here?
 
Last edited by a moderator:
Level 5
Joined
Apr 24, 2007
Messages
90
My lessons are over so post any time. I also downloaded a map protector so im going to find out how to make it achnolegede you so you can acess the map. And as soon as I say OK u can delete ur post witht the attachment.
 
Last edited:
Level 21
Joined
Jan 5, 2005
Messages
3,515
the kill limit, or kills needed to win, is defined by the variable integer "KillsToWin". this integer can be set by player 1 (red) by typing "-Kills X" or "-kills X" where x is the value they want it set to as a number. the number can be anything between 0 and 99,999. you may have to add another condition to ensure the user cant type in 0. does this explain things?
 
Status
Not open for further replies.
Top