Unit Kill Count Trigger Assistance

  • Thread starter Thread starter lordloki
  • Start date Start date
L

lordloki

Guest
I am trying to make it so that a specific Unit type keeps track of how many kills it has. In this case it is a Hero, however, since he is not pre-placed, it would need to be done with unit type. I want to keep track of his kills and then a cinematic from unit to display his counts.

Here is what I have tried, everything else was just to far off..

Hero1
Events
Unit - A unit Dies
Conditions
(Unit-type of (Killing unit)) Equal to Hero1
Actions
Set Hero1_Kills[(Integer A)] = (Hero1_Kills[(Integer A)] + 1)
Cinematic - Send transmission to (All players) from (Killing unit) named Hero1 : Play No sound and display (((Name of (Killing unit)) + shouts) + ((|CFFEC008C + (String(Hero1_Kills[(Integer A)]))) + |R)). Modify duration: Add 0.00 seconds and Wait

Now you may have noticed I am using Integer A. To be honest, I am not quite sure what else to use as a raw number value there.

And I have looked, and yet to have found a tutorial or post on this in here or wc3camp, and wc3sear.ch

Any Suggestions are welcome. :)
 
I can help, show me your multiboard or leaderboard you use and I will whip you one up in no time.
 
Problem is its for a Unit not a player.... am trying "Custom Value Of Unit" now.
 
Also tell me if there are ANY heros or units that you dont want to have it count.
 
Gimli
Events
Unit - A unit Dies
Conditions
(Unit-type of (Killing unit)) Equal to Gimli
Actions
Set Gimli_Kills[(Custom value of (Killing unit))] = (Gimli_Kills[(Custom value of (Killing unit))] + 1)
Cinematic - Send transmission to (All players) from (Killing unit) named Gimli : Play No sound and display (((Name of (Killing unit)) + shouts) + ((|CFFEC008C + (String(Gimli_Kills[(Custom value of (Killing unit))]))) + |R)). Modify duration: Add 0.00 seconds and Wait

Legolas
Events
Unit - A unit Dies
Conditions
(Unit-type of (Killing unit)) Equal to Legolas
Actions
Set Legolas_Kills[(Custom value of (Killing unit))] = (Legolas_Kills[(Custom value of (Killing unit))] + 1)
Cinematic - Send transmission to (All players) from (Killing unit) named Legolas: Play No sound and display (((Name of (Killing unit)) + shouts) + ((|CFFEC008C + (String(Legolas_Kills[(Custom value of (Killing unit))]))) + |R)). Modify duration: Add 0.00 seconds and Wait

This is what I have tried...

If you havent heard I am basing my maps off LOTR and working up a campaign... I want these 2 hero's and ONLY these 2 to call out their number of kills.

BTW.. they do not start out in the game... They are triggered spawns later.
 
Ok, thats a fun one to do. But you got a darn good trigger guy at your service.
Give me some time and poking at ideas and I will post my conclution.

I need to know, do they have to be counted ceperatly? And also who owns the 2 guys?
 
Yes they need to be separate and Player 1 Red owns both

I like to think I am pretty damn good with triggers

But this one escapes me..
 
Unit Count doesn't work for me.

Multiboard
Events
Time - Elapsed game time is 0.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 14 rows, titled Soul Stone V1.00
Set Multiboard = (Last created multiboard)
Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to HeroKills
Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to CreepKills
Multiboard - Set the text for (Last created multiboard) item in column 4, row 1 to Deaths
Multiboard - Set the text for (Last created multiboard) item in column 5, row 1 to Status
Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
Multiboard - Set the width for (Last created multiboard) item in column 0, row 0 to 6.00% of the total screen width
Multiboard - Set the width for (Last created multiboard) item in column 4, row 0 to 5.00% of the total screen width
Multiboard - Set the width for (Last created multiboard) item in column 1, row 0 to 7.00% of the total screen width
Multiboard - Set the text for (Last created multiboard) item in column 0, row 2 to 0
Multiboard - Set the text for (Last created multiboard) item in column 0, row 8 to 0
Multiboard - Set the text for (Last created multiboard) item in column 0, row 14 to <Empty String>
Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to |cffffcc00Alliance|...
Multiboard - Set the text for (Last created multiboard) item in column 1, row 8 to |cffffcc00Horde|r
For each (Integer A) from 2 to 2, do (Actions)
Loop - Actions
Multiboard - Set the text for (Last created multiboard) item in column 2, row (Integer A) to 0
Multiboard - Set the text for (Last created multiboard) item in column 3, row (Integer A) to 0
Multiboard - Set the text for (Last created multiboard) item in column 4, row (Integer A) to 0
For each (Integer A) from 8 to 8, do (Actions)
Loop - Actions
Multiboard - Set the text for (Last created multiboard) item in column 2, row (Integer A) to 0
Multiboard - Set the text for (Last created multiboard) item in column 3, row (Integer A) to 0
Multiboard - Set the text for (Last created multiboard) item in column 4, row (Integer A) to 0
For each (Integer A) from 3 to 7, do (Actions)
Loop - Actions
Multiboard - Set the text for (Last created multiboard) item in column 2, row (Integer A) to 0
Multiboard - Set the text for (Last created multiboard) item in column 3, row (Integer A) to 0
Multiboard - Set the text for (Last created multiboard) item in column 4, row (Integer A) to 0
Multiboard - Set the text for Multiboard item in column 1, row (Integer A) to (|c00ff0000 + ((Name of (Player(((Integer A) - 2)))) + |r))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player(((Integer A) - 2))) slot status) Equal to Is playing
Then - Actions
Multiboard - Set the text for Multiboard item in column 5, row (Integer A) to |cff66FF66Playing|r
Else - Actions
Multiboard - Set the text for Multiboard item in column 5, row (Integer A) to |cff66FF66None|r
For each (Integer A) from 9 to 13, do (Actions)
Loop - Actions
Multiboard - Set the text for (Last created multiboard) item in column 2, row (Integer A) to 0
Multiboard - Set the text for (Last created multiboard) item in column 3, row (Integer A) to 0
Multiboard - Set the text for (Last created multiboard) item in column 4, row (Integer A) to 0
Multiboard - Set the text for Multiboard item in column 1, row (Integer A) to (|c00ff0000 + ((Name of (Player(((Integer A) - 2)))) + |r))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player(((Integer A) - 2))) slot status) Equal to Is playing
Then - Actions
Multiboard - Set the text for Multiboard item in column 5, row (Integer A) to |cff66FF66Playing|r
Else - Actions
Multiboard - Set the text for Multiboard item in column 5, row (Integer A) to |cff66FF66None|r
Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Player
Multiboard - Set the text for (Last created multiboard) item in column 5, row 2 to <Empty String>
Multiboard - Set the text for (Last created multiboard) item in column 5, row 8 to <Empty String>
Multiboard - Show (Last created multiboard)
Multiboard - Minimize (Last created multiboard)
Set Integer_MBTimer_hours = 0
Set Integer_MBTimer_mins = 0
Set Integer_MBTimer_secs = 0
Trigger - Turn on Multiboard Timer <gen>
Trigger - Turn off (This trigger)

Update Multiboard
Events
Unit - A unit Dies
Conditions
((Owner of (Killing unit)) controller) Equal to User
Actions
Set Multiboard_Spots[(Player number of (Owner of (Killing unit)))] = List
Set List = (List + 2)
Set PlayerCreepKills[(Player number of (Owner of (Killing unit)))] = PlayerCreepKills[((Player number of (Owner of (Killing unit))) + 1)]
Multiboard - Set the text for (Last created multiboard) item in column 3, row MultiBoard_Spot[(Player number of (Owner of (Killing unit)))] to (String(PlayerCreepKills[(Player number of (Owner of (Killing unit)))]))
:banghead:
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Hey Ghan, whatever cron job its part of its not running its been the same for days. If it does not work can we remove it?
  • The Helper The Helper:
    LOL! A tweak job!
  • The Helper The Helper:
    this is the fix I get from that yeah this is hard to control. disabling bots is pretty much necessary as ai and other bots would push really old threads to the top. reduce weight of view count. disable guest view tracking if you really want to push active threads to the top. a bit of tinkering for a few days with the weights and other settings should get you a decent trending widget box.
  • Ghan Ghan:
    I changed the settings a bit.
  • Ghan Ghan:
    Narrowed it to 7 days for the half-life and set views to 0 weight.
  • The Helper The Helper:
    I dont think Trending would work for this forum it would be better to just have the last 5 posts from anywhere
  • Ghan Ghan:
    Probably will have to give it some time to update.
  • Ghan Ghan:
    I'm guessing it is not retroactive.
  • Ghan Ghan:
    Next on the punch list: Update the server to Ubuntu 24.04.
  • The Helper The Helper:
    Mad Lads is new I see it displays original post date
  • The Helper The Helper:
    as long as it changes it is good - it is good now it updated and its new stuff
  • The Helper The Helper:
    One thing I have noticed and I dont know if it is by design but like 1 out of 3 times I come to the site the Anubis screen just hangs open, if I refresh it will go away but sometimes it hangs
  • Ghan Ghan:
    I've seen that as well.
  • The Helper The Helper:
    Wow - the change in the stats are major. I kind of knew it was all bots but wow, to see the effect. Why the social media sites cant do something like this I have no idea.
  • Ghan Ghan:
    Probably inflates their numbers so they look better to advertisers.
  • The Helper The Helper:
    Yeah google does not filter those bots. I remember when Apex was doing Google ads I saw the same IPs in there as I was seeing here - google is totally tracking all those bots as traffic and most google traffic, at least ours, was all bots
  • The Helper The Helper:
    oh wow, i bet i can post x links now and do the webp pics now giggity
  • The Helper The Helper:
    ahh anubis blocks anyone that has javascript turned off
  • The Helper The Helper:
    Robot: HTTP client library - i love the new robot :)
  • The Helper The Helper:
    New Science News Forum and it starts out with 420 threads :)
  • The Helper The Helper:
    Technical Support forum name changed To Technology News, there is now a Tech, sci/tech and science forums now :)
  • The Helper The Helper:
    Happy Saturday! Hope everyone has a fantastic weekend!
  • Ghan Ghan:
    We are now on Ubuntu 24.04. Had some issues with the style after the OS/PHP upgrade but now resolved.
    +1
  • Ghan Ghan:
    PHP 8.3 now live
    +1

The Helper Discord

Staff online

Members online

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top