| 01-30-2003, 01:20 PM | #1 |
I have made a leaderboard to track hero levels, so everyone knows where they stand relative to the enemy. I can create the leaderboard just fine, but I have two problems: 1) I need the array to initally be set to "1" 2) My leaderboard updates in a wacky way Here are the triggers I use: ***SETUP*** [Event] Time Elapses = 2.00 seconds [Action] Create a Leaderboard for (All Players) titled Level Pick Every Player in (Matching Player Slot Status (Is Playing)) and Create Leaderboard for (Matching Players) Leaderboard - Show (Last Created Leaderboard) ***UPDATE*** [Event] Unit Owned by Player 1 Gains a level '' '' Unit Owned by Player 12 Gains a Level [Action] Set (Variable Array) Level[(Player Number of (Owner of Leveling Hero)))] = Level[(Player Number of (Owner of Leveling Hero)) + 1) Leaderboard - Change the value for (Owner of Leveling Hero)) in (Last Created Leaderboard) to Level[(Player Number of (Owner of Leveling Hero)))] Sort (Last Created Leaderboard) by Value in Descending Order **************************************** Here's what happens: the board is created fine for active players (albeit set to 0 not 1), but it updates funky. The first time my hero gains a level, it changes the value to 2. Then afterwards it ignored hero levelling and refuses to update. What do you think? Help would be appreciated, as I apparently stinky at triggers! Hakujin |
| 01-30-2003, 04:08 PM | #2 |
Most peculiar. The trigger you have set up seems fine to me. Try adding a display text message somewhere in the update trigger and see if its firing. If it is then I don't know whats wrong. |
| 01-30-2003, 05:04 PM | #3 |
Do you know how I can set the array to "1" for all players? I tried: [Action] Set Level[(Player Number of (Player in (Matching Player Slot Status (Is Playing)))] = 1 but it didn't work :( Hakujin |
| 01-30-2003, 05:16 PM | #4 |
usign matching player only works if you are doing a condition that has "Matching a condition" You need to do: For each interger A 1 - (max number of people in yr map) Set HeroLevel[IntergerA] = 1 then update the board |
| 01-30-2003, 07:21 PM | #5 |
thats what I was going to say. Oh well. Anyway I still don't understand how your trigger is only firing once. Can you try what I suggested above and see if your text message pops up when you level up. |
| 01-30-2003, 09:03 PM | #6 |
Thanks all, I got it working. It was uh, syntax error on the very last variable. Doh. User Error strikes again. But thanks to you both, I was able to get the leaderboard up, at level 1, and updating correctly. I'm also excited because I have finally gotten my "random encounter" trigger system setup. It allows me to generate random encounters using 3 random monsters of 3 categories, and attack in 4 different ways. And the whole thing is only 4 triggers (attack patterns) + 1 trigger (regional monster types) + 1 trigger (encounter location). It is fully modular to all the encounters in my map. To change the types of monsters created, I only have to add a single trigger for the area. Sometimes I'm an idiot (as illustrated in this thread) and sometimes I'm pure genius (eg, encounter generator). Dakan, I really like your map HeroQuest. But I HATE running all the way back to the stores to buy things, etc. Have you considered regional teleporters a la Valley of Dissent? Also, dying on the last enemy is pretty common. Maybe if all the chars die you could respawn them at the store area or something? It stinks spending 2 hours dungeon crawling only to lose at the very end! |
