HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Uruk-Hai board

02-03-2004, 04:24 PM#1
Frozzt
in my helms deep map I'm trying to make a board that shows how many uruk-hais there is left, I made a Real variable that was set to 10,000 and I've tried with integer too, but there is no way to update the leaderboard title to the current real or integer number:

------------------------------------
Trigger Code:
Trigger:
A unit dies
Condition:
or any conditions are true:
unit-type of dying unit equal to Uruk-Hai
unit-type of dying unit equal to Uruk-Hai Crossbow
Action:
Set Real = (Number of Real) - 1
Change the Title of last created Leaderboard (or timerwindow) to current number of Real.

End of Trigger
------------------------------------

Now, there is no way to put the real or integer number into the leaderboard or timerwindow.
Anyone knows how to put the number into the leaderboard or window, or anyone has an other way of solving this problem??
02-03-2004, 05:24 PM#2
AllPainful
Convert integer to string. (its a fuction that you will find in the dropdown box in the window where you normally type in text)

Where your putting the string (text) look in the dropdown box for the conversion option...

There is also a "Convert Real to String"
02-03-2004, 06:25 PM#3
Frozzt
Okay?!

Could you tell me where I convert it, not used to use strings
02-03-2004, 09:16 PM#4
AllPainful
I don't think you understand.

You cant.

Strings = Text, Title = Text, so Title = String

To put an integer in the title, in the window where you would normally type in the title you would instead goto the dropdown menu and find convert integer to string.
02-03-2004, 10:35 PM#5
ABM
trigger: create a integer variable Urukhai = 10 000
create a leaderboard, add player 9 to last created leaderboard with name Uruk-Hai and value urukhai

E:
unit die
C:
unit type of dying unit = uruk-hai or unit type of dying unit = uruk-hai crossbow.
A:
set urukhai = urukhai -1
leaderboard change value for player 9 in last created leaderboard to urukhai.
02-03-2004, 10:47 PM#6
Shark
here's the triggers

update stuff
Events
Time - Every 5.00 seconds of game time
Conditions
Actions
Leaderboard - Change the value for Neutral Passive in TheBoard to UrukNumber

Leaderboard initialisation
Events
Conditions
Actions
Leaderboard - Create a leaderboard for (All players) titled Kills:
Set TheBoard = (Last created leaderboard)
Leaderboard - Show TheBoard
Leaderboard - Add Neutral Passive to TheBoard with label Uruk-Hai left: and value UrukNumber
Leaderboard - Change the color of the label for Neutral Passive in TheBoard to (100.00%, 100.00%, 100.00%) with 0.00% transparency
Leaderboard - Change the color of the value for Neutral Passive in TheBoard to (100.00%, 100.00%, 100.00%) with 0.00% transparency

Update score
Events
Unit - A unit Dies
Conditions
(Owner of (Dying unit)) Equal to Uruk-Hai_Player
Actions
Unit Group - Remove (Dying unit) from MasterGroup
Leaderboard - Change the value for Neutral Passive in TheBoard to (UrukNumber - 1)

You need the following variable: UrukNumber - integer, 10 000 initial value; TheBoard - leaderboard, none
hope it helps....
02-04-2004, 06:55 AM#7
Frozzt
Quote:
Originally posted by ABM
trigger: create a integer variable Urukhai = 10 000
create a leaderboard, add player 9 to last created leaderboard with name Uruk-Hai and value urukhai

E:
unit die
C:
unit type of dying unit = uruk-hai or unit type of dying unit = uruk-hai crossbow.
A:
set urukhai = urukhai -1
leaderboard change value for player 9 in last created leaderboard to urukhai.

Thx for this. I used the exact same trigger system yesterday before I went to bed.