Now I've got a bug that, since they're all custom heroes, a few of them completely custom, the default Melee map command
Code:
Melee Game - Limit Heroes to 1 per Hero-type (for all players)
for limiting heroes does absolutely nothing to my new, custom heroes.
I've looked around the trigger editor and played with stuff, but nothing seems to work.
Also, I've got a small leaderboard problem I cant seem to get fixed. The counter wont go up past 2.
Code:
Set Kills[(Player number of (Owner of (Killing unit)))] = ((Player number of (Owner of (Killing unit))) + 1)
Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to Kills[(Player number of (Owner of (Killing unit)))]
Leaderboard - Sort (Last created leaderboard) by Value in Descending order
Any and all help would be greatly appreciated.
|||As far as your counter goes, cause you are player one, and that will stay the same, it will automatically, say that if the trigger runs player 1 = 1 + 1 = 2.
Code:
Set Kills = Kills + 1
Thats what you will need|||Quote:
As far as your counter goes, cause you are player one, and that will stay the same, it will automatically, say that if the trigger runs player 1 = 1 + 1 = 2.
Code:
Set Kills = Kills + 1
Thats what you will need
How exactly would I go about doing that? When I try and mess with the Set Variable = X + (X+1) it wants me to fill in an index, which makes this not work.
Like I said, I'm sort of new to figuring this stuff out. I've played with the thing for about 3 hours now on this one piece of script and it's driving me insane.|||Quote:
How exactly would I go about doing that? When I try and mess with the Set Variable = X + (X+1) it wants me to fill in an index, which makes this not work.
Like I said, I'm sort of new to figuring this stuff out. I've played with the thing for about 3 hours now on this one piece of script and it's driving me insane.
Example.
X default is 0
so X = 0 is what we start with.
in a trigger the following is presented.
X = X + 1
This action is being ran 3 times.
That would look like the following.
X = 0 + 1 = 1
X = 1 + 1 = 2
X = 2 + 1 = 3
So after running this trigger 3 times, X will give 3 as the outcome.
That is how my action in the first post is counted, by the editor, every time the event is being activated, and the actions are being executed.
for more explanation about variables, I'd suggest you read a tutorial about variables.|||Well I know how a variable would function and stuff, and what you're saying makes perfect sense.
MY problem is getting there, making the trigger say that ;P
No comments:
Post a Comment