I would like to track "Point value of Units killed" in game. And I did using a trigger.
I would like to store in a variable = [Player's "Point value of Units killed"]/ (10000) and rounded to whole numbers.
So basically when the score (Point value of Units killed) reaches 10000,
in the variable I want there to be "1"
If the score (Point value of Units killed) reaches 20000,
in the variable I want there to be "2"
And so on.
Does anyone know how to do this? I suffered a lot but I could not find the answer. There is no adaquate triggers. But I have seen this done on another map so I know for sure it is possible.
I am going to then display the variable in a leaderboard, which I already know how to do.. Instead of showing big number "Point value of Units killed") I want to only show the players smaller scale of score, because " the Point value of killed score" end of being huge numbers. Thanks a lot in advance
you could create two arrays one for the unit type and one for the unittypes's given kill value
you could use a custom value on a unit to assign a given value
you could use the built in killing score value of the unit in the unit data
Handling the unit values to get the result you want
depending on the method you use to handle the scores you may not be able to use .00001 as a given score on a unit
to deal with this.... prior to displaying the value you could Divide the players actual score by 10000 and then display the result with no decimals displayed
not sure what else you really need to know to do this .... its pretty simple
AH.....
Every time the player kills a unit you are already incrementing the players score so you want to do something like this after incrementing the score
this is assuming you have an array that tracks the players killing scores
var PlayerKillScores(type:integer Array:[0-15])
var PlayerScoreTracker(type:integer Array:[0-15] default value:0)
ActionDefinition(name:Update Players Score)
parameters
PlayerToUpdate
Variables
DisplayScore(type:Integer)
Actions
DisplayScore = convert real to int( math ( (PlayersKillScores[PlayerToUpdate]) / 10000)
set leaderboard text Row of player(PlayerToUpdate), Column of Score to "DisplayScore"
if
PlayerScoreTracker[PlayerToUpdate] < DisplayScore
then
set PlayerScoreTracker[PlayerToUpdate] = DisplayScore
Spawn Unit for PlayerToUpdate
run this for the player after updating a players kill score
added var PlayerScoreTracker to keep track of players score for the increments and unit spawning
Adding on the score thing above, is there a way to create a Unit when that rounded whole number increase? For example, if a person becomes "1" from "0," I want to create a mule on one place to award him. Is this possible? Every change, or increase in the number. I also want to say in dialogue "Level Up," but the problem for this I am experiancing right now is that dialogue appears to ally. I just want the triggering player to see this, but the option for triggering player only is not there. Do you know how to make this work too?
Okay thank you. If you also realize the "Text Message" Action CANNOT be applied to just that "picked integer" or just that player. This action as well as all the other messages have to be shown to Allies, or player groups, not just only that triggering player. Could you help me solve that too?
Each time their whole, single number increase, I want there to appear to that triggering player the message "Level Up." Just to that person who leveled up, not anyone else.
How many points a unit is worth is already set by Blizzard. If you set the ACtion Track "the Point value of killed score" in the Map initialization, the game automatically keep tracks of the points each players gain. However, because "the Point value of killed score" is so big, it is sort of annoying to see them in the Leaderboard. For example, a stalker is 500 points etc. The points are huge. So when they level up I want to only show them what players need to see, a increase of 1 Level each time in the Leaderboard. So technicially they are level up every 10000 points in "the Point value of killed score" but they only see single digit levels in the leaderboard.
I know how to set leaderboard and all that. It's only what we have discussed before.
some of that may seem a bit more complex and advanced to you but I tried to put in some good coding practices.....
they may seem tedious and redundant but it make sure it doesnt fail in the future...
custom conditions are good for when you want to reuse the same conditions over and over and help with testing purposes
And im off to class if you have any questions regarding it try to list them in a well formatted manner in a clear and concise way. So i can better respond to them.
Thank you Sooo Much for helping me out! With your enormous effort, my map is almost finished. Although some of the things you did were too hard for amateur me to understand, but I learned a lot and my map works now.
Thank you again soo much. I will mention your name when I publish my map. It will be called, "Cool Rock: Sacrus" It is 3v3 Nexus War. Check it in like Next year January. Thankss
Did you mean to apply that Leaderboard to just player one or all players? Because I played with other people and theirs didn't show and I was the only one whose Mule was being created every level ups. I added Picked player and create (for picked player) a mule in the update player score sention
There was a gap between the score of the first player and the Title. To eliminate that, I added row Headers. And following right after that players name and scores. 6th row has to be for 7th player so i did that. (player 6 is bugged so I had to change everything to player 7. A pain in the butt. definitely) I changed the leaderboard score showing by only showing the LEVEL, and not KILL SCORE. So there are two columns instead of 3.
I changed picked player to picked integar because I wasn't familiar with picked integer and because for some reason when player leveled up, mule was created for me, instead of for those triggering players. I thought changing to integer might fix but it didn't lol.
So there is not alternation from your masterful DEMO. Thank you so much for helping me so much. You efforts are really really appreciated!
Hi SoulCarve again. I have a question about your demo. I have set a trigger that once any player kill an egg that is in the middle of the map they gain + 2000 in their Point Values of Kill Score. I have the picture. But somehow this does not show up in the score section of your leaderboard. Can you figure out what is wrong?
ATTACHMENTS
Capture.PNG
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi!
I would like to track "Point value of Units killed" in game. And I did using a trigger.
I would like to store in a variable = [Player's "Point value of Units killed"]/ (10000) and rounded to whole numbers.
So basically when the score (Point value of Units killed) reaches 10000, in the variable I want there to be "1"
If the score (Point value of Units killed) reaches 20000, in the variable I want there to be "2"
And so on.
Does anyone know how to do this? I suffered a lot but I could not find the answer. There is no adaquate triggers. But I have seen this done on another map so I know for sure it is possible.
I am going to then display the variable in a leaderboard, which I already know how to do.. Instead of showing big number "Point value of Units killed") I want to only show the players smaller scale of score, because " the Point value of killed score" end of being huge numbers. Thanks a lot in advance
@coolcool1994: Go
well you have several options.....
not sure what else you really need to know to do this .... its pretty simple
AH.....
Every time the player kills a unit you are already incrementing the players score so you want to do something like this after incrementing the score
this is assuming you have an array that tracks the players killing scores
var PlayerKillScores(type:integer Array:[0-15])
var PlayerScoreTracker(type:integer Array:[0-15] default value:0)
run this for the player after updating a players kill score
added var PlayerScoreTracker to keep track of players score for the increments and unit spawning
@SouLCarveRR: Go
Adding on the score thing above, is there a way to create a Unit when that rounded whole number increase? For example, if a person becomes "1" from "0," I want to create a mule on one place to award him. Is this possible? Every change, or increase in the number. I also want to say in dialogue "Level Up," but the problem for this I am experiancing right now is that dialogue appears to ally. I just want the triggering player to see this, but the option for triggering player only is not there. Do you know how to make this work too?
Thank you for your work!
@coolcool1994: Go
Sure Ill modify the code to show you how to spawn the new units
See my prior post it is edited
@SouLCarveRR: Go
To me, the idea was very convincing but it doesn't work. Ill upload so you can see.
Did I do something wrong?
There
@coolcool1994: Go
yeah you did something very wrong
You didnt make an action definition that you pass the owner of the killing unit too....
Ill make a sample map for you
@SouLCarveRR: Go
Okay thank you. If you also realize the "Text Message" Action CANNOT be applied to just that "picked integer" or just that player. This action as well as all the other messages have to be shown to Allies, or player groups, not just only that triggering player. Could you help me solve that too?
Thank you very much!
@coolcool1994: Go
Sure what exactly do you need to be out putted to the players.... Im in class for 3 hours then when I get home I will make the sample map for you.
Wont take me long to wipe up.
also .... how did you want to determine how many points a unit is worth..... or are all units only worth 1 point?
@SouLCarveRR: Go
Each time their whole, single number increase, I want there to appear to that triggering player the message "Level Up." Just to that person who leveled up, not anyone else.
How many points a unit is worth is already set by Blizzard. If you set the ACtion Track "the Point value of killed score" in the Map initialization, the game automatically keep tracks of the points each players gain. However, because "the Point value of killed score" is so big, it is sort of annoying to see them in the Leaderboard. For example, a stalker is 500 points etc. The points are huge. So when they level up I want to only show them what players need to see, a increase of 1 Level each time in the Leaderboard. So technicially they are level up every 10000 points in "the Point value of killed score" but they only see single digit levels in the leaderboard.
I know how to set leaderboard and all that. It's only what we have discussed before.
@coolcool1994: Go
Ill whip you up something special.....
@SouLCarveRR: Go
wow thanks. I look forward to see it
@coolcool1994: Go
here you go
some of that may seem a bit more complex and advanced to you but I tried to put in some good coding practices.....
they may seem tedious and redundant but it make sure it doesnt fail in the future...
custom conditions are good for when you want to reuse the same conditions over and over and help with testing purposes
And im off to class if you have any questions regarding it try to list them in a well formatted manner in a clear and concise way. So i can better respond to them.
@SouLCarveRR: Go
Thank you Sooo Much for helping me out! With your enormous effort, my map is almost finished. Although some of the things you did were too hard for amateur me to understand, but I learned a lot and my map works now.
Thank you again soo much. I will mention your name when I publish my map. It will be called, "Cool Rock: Sacrus" It is 3v3 Nexus War. Check it in like Next year January. Thankss
@SouLCarveRR: Go
Did you mean to apply that Leaderboard to just player one or all players? Because I played with other people and theirs didn't show and I was the only one whose Mule was being created every level ups. I added Picked player and create (for picked player) a mule in the update player score sention
@coolcool1994: Go
leaderboard dialog needs to be shown for all players.....
if the mule isnt being created you prolly didnt add your code correctly...
take screen shots of all your coding changes and Ill help you out....
@SouLCarveRR: Go
Haha, Thanks a Lot. Well, I changed a bit.
There was a gap between the score of the first player and the Title. To eliminate that, I added row Headers. And following right after that players name and scores. 6th row has to be for 7th player so i did that. (player 6 is bugged so I had to change everything to player 7. A pain in the butt. definitely) I changed the leaderboard score showing by only showing the LEVEL, and not KILL SCORE. So there are two columns instead of 3.
I changed picked player to picked integar because I wasn't familiar with picked integer and because for some reason when player leveled up, mule was created for me, instead of for those triggering players. I thought changing to integer might fix but it didn't lol.
So there is not alternation from your masterful DEMO. Thank you so much for helping me so much. You efforts are really really appreciated!
@coolcool1994: Go
On the "UpdatePlayerScore" Action definition
@SouLCarveRR: Go
Hi SoulCarve again. I have a question about your demo. I have set a trigger that once any player kill an egg that is in the middle of the map they gain + 2000 in their Point Values of Kill Score. I have the picture. But somehow this does not show up in the score section of your leaderboard. Can you figure out what is wrong?