HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Leaderbord UPDATE Help

04-10-2003, 12:33 PM#1
Hubie
I have a problem, and I don´t understand whats wrong...
I was creating a Leaderbord for my new map Blood's Domination:

Leaderbord already created, In game I can see it and all is well

Variable: Kills[array] <--- Integer
I want the Kills Variable to show in the Leaderbord...

So i Did:

Event: A unit owned by Player 5 dies

Condition: Dying Unit is a Hero = true and Owner of (Killing Unit) is (Random Player of Team1)

Just for Info :> : Team1 is Player 1-4, Team2 is Player 5-8

Action: Set Kills[Player Number of Owner of (Killing Unit)] = Kills[Player Number of Owner of (Killing Unit)] + 1

Set Kills [Player Number of (Neutral enemy)] = Kills[Player Number of (Neutral enemy)] + 1

Neutral enemy: Is the "Topic" in the Leaderbord for the first team, gathering all kills for Team1 ||| Neutral passive the same for Team2

Trigger - Run Update Leaderbord (ignoring Conditions)






Trigger Update LEaderbord

Event -
Condition -

Action: Leaderbord - Change the Value for (Owner of (Killing Unit)) in (LIST <- that´s the "last created Leaderbord) to Kills[Player Number of Owner of (Killing Unit)]

Action: Leaderbord - Change the Value for (Neutral enemy) in (LIST)
to Kills[Player Number of (Neutral enemy)]

And that´s the joke: The Neutrals get one more Kill but the specific killing Player doesn´t get any Kills ^^

PLEASE help me :-((
04-10-2003, 01:26 PM#2
FyreDaug
Quote:
(Owner of (Killing Unit))

There's your problem right there, there is no Owner of Killing Unit in that trigger. What you should do is on yoru first trigger, make a variable called PlPlayer (Make it a player variable ;)) Then in the first trigger make an action:
Code:
PlPlayer equal Owner of (Killing Unit)

In the second trigger where you have "Owner of Killing Unit" change that to your player variable and it will work.
04-10-2003, 02:12 PM#3
Hubie
No it doesn´t work :bgrun:

I edit : PlPlayer (Player) = Owner of (Killing Unit) In each trigger and after it: Trigger - run Update Leaderbord (ignoring Conditions) but the Leaderbord still jsut show me the Neutral enemy (Team) Kills


Must I edit: Change the value for PlPlayer to Kills[Player Number of PlPlayer or Owner of (Killing Unit)]




No matter, it doesn´t work either ^^

I will give u a correctly Description of my Trigger
It´s just a piece, cause for each player killed event I made the same trigger with other players :>

Code:
Event:
 A Unit owned by Player5 died

Condition:
 (Dying Unit) is a Hero = true AND Owner of (Killing Unit) Ungleich Random Player from (Team2 - The team that Player5 belongs to)

Action: 
Set Kills[Player Number of Owner of (Killing Unit)] = Kills[Player Number of Owner of (Killing Unit)] + 1

Set Kills[Player Number of Neutral enemy(In LEaderbord called Team1, gathering ALL Points of each Kill of its members)] = Kills[Player Number of Neutral enemy] + 1

Set PlPlayer (a Player Variable) = Owner of (Killing Unit)

New Trigger:

[code]Event
-

Condition:
-

Action:
Leaderbord - Change the Value for Neutral Enemy in LIST(Leaderbord Variable, is last created Leaderbord) to Kills[Player Number of Neutral enemy] <--- That works

Leaderbord - Change the Value for PlPlayer in LIST to Kills[Player Number of PlPlayer / Owner of (Killing Unit)]

Both Possibilities, PlPlayer and Owner of (Killing Unit) don´t work
I Begin to think, my editor is buggy, I had probs like this before!
04-10-2003, 02:33 PM#4
Hubie
I forgott to say in first code...

Trigger - Run Update Leaderbord (ignoring Conditions)

and I forgott the [/code] in the second trigger *glurcks*:ggani:


Wow - I give up... I coded again now noone gets any Kills
04-10-2003, 02:42 PM#5
Guest
I don't understant very well what you want to do, then i will probably say something wrong. I assume that you want a label for each player plus 1 label for each team. I'll write here all you need to do. You'll probably think this a bit too explicated, sorry.
First, create the leaderboard and add all the players to it:
(you normally do something like that)
Trigger "Init Leaderboard"
Event - Nothing Here
Condition - Nothing Here
Actions:
Leaderboard - Create a leaderboard for (All Players) titled Players Kills (or what you want)
For Each integer A from 1 to 8 do (if (((Player(Integer A)) slot status) equals to Is Playing) Then Do (Leaderboard - Add (Player(Integer A)) to (Last created Leaderboard) with label Name of (Player(Integer A)) and value 0) else do (Do Nothing))
Leaderboard - Add (Neutal enemy) To (last created leaderboard) with Label Team 1 and value 0
Leaderboard - Add (Neutal passive) To (last created leaderboard) with Label Team 2 and value 0
For Each Integer A from 1 to 8 Do Set Kills[Integer A] = 0

Trigger On Kill
Events:
A unit owned by Player 1 dies
A unit owned by Player 2 dies
A unit owned by Player 3 dies
A unit owned by Player 4 dies
A unit owned by Player 5 dies
A unit owned by Player 6 dies
A unit owned by Player 7 dies
A unit owned by Player 8 dies
Conditions:
(Player - (Owner of (Killing unit)) Is an enemy of (Owner of (Dying unit)) equals TRUE)
Actions:
Set Kills[Player Number of(Owner of (Killing Unit))] = Kills[Player Number of(Owner of (Killing Unit))] + 1
If ((Player Number of(Owner of (Killing Unit))) < 5) Then Do (Set Kills[Player number of (Neutral enemy)] = Kills[Player number of (Neutral enemy)] + 1) else do (Set Kills[Player number of (Neutral passive)] = Kills[Player number of (Neutral passive)] + 1)
Trigger - Run Update Leaderboard

Trigger: Update Leaderboard
Event: Nothing Here
Condition: Nothing Here
Actions:
For Each Integer A from 1 To 8 Do (Leaderboard - Change the Value for Player(Integer A) to Kills[Integer A])
Leaderboard - Change the Value for (netral enemy) to Kills[Player number of (neutral enemy)]
Leaderboard - Change the Value for (netral passive) to Kills[Player number of (neutral passive)]

I think I don't forgot anything. This should (and i hope it will) work.
04-10-2003, 03:03 PM#6
DaKaN
the main problem is picking a random player from the team part, the owner of the killing unit might not be the randomly chosen player.. that would kill the condition right there and the trigger would never fire
04-10-2003, 04:00 PM#7
Guest
Sorry for that, but I don't understand what you mean, so could you be more precide (but after all, it isn't my thread...)
04-10-2003, 04:28 PM#8
DaKaN
i mean what i said, when he uses the:
Dying Unit is a Hero = true and Owner of (Killing Unit) is (Random Player of Team1)

the killing unit will not allways be the random player that is chosen in that condition.

if there is 6 people on the team, and player1 kills the unit, but the random chosen player of team 1 is player2, the trigger wont fire.
04-10-2003, 04:57 PM#9
Guest
Oh, yes, you're right. I hadn't seen the random in the post whe i read it. :bangH:
04-12-2003, 08:30 AM#10
Hubie
Hmm Mirror, I understand ur thread, that´s what I wanna do, but are the neutrals in the leaderbord about their specific teams?:////


Either... it doesn´t work... I´ll get a new edit, may be the classic one is the case of all my silly problems...
04-12-2003, 10:00 AM#11
Hubie
Lol wtf... unbelievable... I got it:

The mistake was this:

U see the difference?
-
Set Kills[(Player Number of (Owner of(Killing Unit)))] = (Kills[(Player number of (Owner of (Killing Unit)))] +1)

and

Set Kills[(Player Number of (Owner of(Killing Unit)))] = Kills[((Player number of (Owner of (Killing Unit))) +1)]

kind of hard that this mistake ruine the hole trigger :p