🏆 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!
Hello guys! My name is layzab0ne and I'm in need of a Multi board and a trigger. At first I want to make a Multi board. i need a trigger that: At first there's a multi board named kills and when ever someone kills a unit, you add one into the multi board. When there are a certain amount of points, like 50, create a unit. I really don't know how to do that. Please help!
a unit dies
set p1 = owner of killing unit
set kills[player number of p1] = kills[player number of p1]+1
run trigger "update board" checking conditions
(update board
loop from 1 to 12
set item in row loop collumn 2 to "kills[loop]"
if kills[loop]>=50 then
set kills[loop]=0
create unit for player(loop)
endloop
Multiboard - Create a multiboard with 2 columns and 9 rows, titled Status
Multiboard - Set the width for (Last created multiboard) item in column 1, row 0 to 14.00% of the total screen width
Multiboard - Set the width for (Last created multiboard) item in column 2, row 0 to 6.00% of the total screen width
Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to |c00aa0000Player Na...
Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to |c00aa0000Kills|r
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
Multiboard - Set the text for (Last created multiboard) item in column 1, row ((Integer A) + 1) to (Name of (Player((Integer A))))
Multiboard - Set the text for (Last created multiboard) item in column 2, row ((Integer A) + 1) to 0
Multiboard - Show (Last created multiboard)
This is a simple multiboard for 8 players, to change the amount of players, change the number of rows in
Actions
Multiboard - Create a multiboard with 2 columns and 9 rows, titled Status
To 'Players + 1'
and
Actions
For each (Integer A) from 1 to 8, do (Actions)
Set the '8' to the number of players.
Then, the update-trigger:
MB Update
Events
Unit - A unit Dies
Conditions
Actions
Set Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)
Multiboard - Set the text for (Last created multiboard) item in column 2, row ((Player number of (Owner of (Killing unit))) + 1) to (String(Kills[(Player number of (Owner of (Killing unit)))]))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Kills[(Player number of (Owner of (Killing unit)))] Equal to 50
Then - Actions
Set TempLoc = (Spawn-Area)
Unit - Create 1 Spawn-Unit for (Owner of (Killing unit)) at TempLoc facing Default building facing (270.0) degrees
Custom script: call RemoveLocation(udg_TempLoc)
Else - Actions
allright, this updates thet kills for every player and sets the amount of kills in the multiboard.
Variables:
"Kills": Integer Variable, array = number of players.
"TempLoc": Point variable, no array
Change "Spawn-Area" to the area where you want the unit to spawn
Change "Spawn-Unit" to the unit that will be spawned
Add the whole if/then/else-action for more kill-rewards and change the "Equal to 50" to the correct amount.
🔨 Downloads and Uploads have been fixed! If you still have trouble downloading or uploading assets to or from Hive, please reach out to us in the Site Discussion board.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.