HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A very basic question

09-02-2002, 06:04 AM#1
Guest
Okay yes, i am actually asking this question :rolleyes: . This is almost embarrasing. Heres the question, I got a leaderboard up and running no problem, and it works, but I want to make it when you reach a certain number on the leaderboard it will spawn a unit at your start location. Say i get 15 points on the leaderboard it would spawn Dark Wizard, then at 30 a Granite Golem. Those are just examples but thats what i mean. How do i do this?
09-02-2002, 09:36 PM#2
Guest
Can no one figure this? I know its not hard, i have tried many different things but cant get it, does anyone have any ideas or possibly a solution?
09-02-2002, 10:12 PM#3
Diabolyx666
Indrid....=(
Are you seriously asking this, or just joking around?
09-02-2002, 10:39 PM#4
Newhydra
Well, I'll assume that you're serious here...

You have the leaderboard, and you have a variable which keeps track of someone's score, correct?

Event: Value of real variable(conversion(convert int to real(VARIABLE))) becomes equal to XX
09-03-2002, 12:10 PM#5
Guest
I thought variables couldn't be specified in events? (only in conds and acts?)
09-03-2002, 06:06 PM#6
Guest
That is the one, sort of, exception. The value that it has to become is locked though, and you can't use a variable for that.. It's really not much different than Timer Expires.

As for the problem at hand... I assume that you have some sort of trigger which updates the leaderboard when someone gets a point (however they are getting points). In that trigger just do a check of the variables to see if they are at a point which would give them a unit, then either run a trigger or just an action depending on where they are at.

What I would do is create an array of Unit-Type which you want to use for your units that will spawn at each level (1 being the first), and my scores would be kept in an array also.

For 1 to numofplayers do If (score[integer A] mod 15) equal to 0 then do Create 1 BonusUnitTypes[score[integerA] Div 15] for (Player(IntegerA)) at (Player(Integer A) Start Location) facing default build position.
09-05-2002, 11:53 PM#7
Guest
Quote:
For 1 to numofplayers do If (score[integer A] mod 15) equal to 0 then do Create 1 BonusUnitTypes[score[integerA] Div 15] for (Player(IntegerA)) at (Player(Integer A) Start Location) facing default build position. [/b]

Okay i am afraid to say this seemingly easy trigger has stumped me. I made the If/Then/Else trigger. For the "If" I got For 1 to 8 players do if (kills[Integer A] Equal to 15) Then do "Action" else Do Nothing.

I dont know what the second action is.