| 04-15-2004, 12:14 AM | #1 |
Ok, I created my multi-board without any problems... but now Im having trouble getting the Updating part of it working right. . . and im not sure why, perhaps im just missing some really obivious step or somesuch thing... anyway, heres the trigger, hopefully someone out there can help. Thanks in advance. Code:
Update Multiboard
Events
Unit - A unit Dies
Conditions - Player1 (red)
Actions
Multiboard - Set the text for (Last created multiboard) item in column 2, row 3 to (String(Kills[((Integer A) + 1)]))Oh, and if you want me to post the actual Multiboard setup itself, just ask. I just didnt see any need for it, but there may be. |
| 04-15-2004, 12:28 AM | #2 |
[quote=Thrall_89]Ok, I created my multi-board without any problems... but now Im having trouble getting the Updating part of it working right. . . and im not sure why, perhaps im just missing some really obivious step or somesuch thing... anyway, heres the trigger, hopefully someone out there can help. Thanks in advance. Code:
Update Multiboard
Events
Unit - A unit Dies
Conditions - Player1 (red)
Actions
Multiboard - Set the text for (Last created multiboard) item in column 2, row 3 to (String(Kills[((Integer A) + 1)]))Oh, and if you want me to post the actual Multiboard setup itself, just ask. I just didnt see any need for it, but there may be.[/QUOTE 1)What is the variable Kill for?? (mean the type, the size of it, and all info related) 2)What the exact problem??? One thing is that for "Integer A" you need to add an Loop action first like this For (a=0 to 10 )do Loop Multiboard - Set the text for (Last created multiboard) item in column 2, row 3 to (String(Kills[((Integer A) + 1)])) And Remenber that the Array Variables start from Zero .... |
| 04-16-2004, 01:08 AM | #3 |
Well, the Kills variable: Type: Interger Size: Array (1) As for the "exact problem" I have my multiboard created, but it simply won't Update the number of kills a player/player's team has made.\ I'll try making the alterations you suggested later (im not on my good comp at the moment) Oh, and when you said "And Remenber that the Array Variables start from Zero ...." you mean if I just leave it at Default it will start from Zero or will it just automatically start at Zero? I'll check back in later and let you know if the alterations you suggested worked. Thanks for the input! |
| 04-16-2004, 01:13 AM | #4 |
You need to set your Multiboard to a variable. You have the update trigger on a separate trigger, where Last Created 'Whatever', only works for the trigger it was made in. |
| 04-16-2004, 01:28 AM | #5 | |
Quote:
Not in my experiences, though of course it does help to set it as a variable |
| 04-16-2004, 01:52 AM | #6 |
Just try it, who knows. I may be right... <Wonders why someone judged his autority again... lol> |
| 04-16-2004, 02:18 AM | #7 |
Set the kills to "Integer A"? If you have any other for loops running in the mean time, Integer A will become something very different, yes? |
| 04-16-2004, 09:30 PM | #8 | |
Quote:
Yep but only if you use another action Loop Integer A, there also Loop Integer B and Loop <variable>. Ok I know why it dont worl.. when putting "Set the text for (Last created multiboard) item in column 2, row 3 to (String(Kills[((Integer A) + 1)]))" you are not aumenting +1 to the variable, youre aumenting +1 to the variable POSITION mean... you are doing EVENT A unit die ACTION Text for multiboard = KILL(0+1) you should do EVENT A unit die ACTION Text for multiboard = KILL(0)+1 Now another problem is that the variable will change one time and no more because youre showing the content of the variable (err 0) and then aumenting 1 . well i think this should be the trigger EVENT A unit die CONDITION Dying unit controller equal to PLAYER1 ACTION set kills(0)=kills(0)+1. Set the text for (Last created multiboard) item in column 2, row 3 to (String(Kills[0])). The kills integer should be an array equal to the number of players that should be in the game so for player1 his variable should be kills[0]<--(This im refering of the array initializing from zero and not from 1) for Player2 should be kills[1] and like that (example for player2) EVENT A unit die CONDITION Dying unit controller equal to PLAYER2 ACTION set kills(1)=kills(1)+1. Set the text for (Last created multiboard) item in column 2, row 3 to (String(Kills[1])). Its a good thing to save your multiboard in a variable, but if you use only one multiboard and you didnt create more it could work. Well hope it work again :D :D :D :D |
| 04-17-2004, 03:30 AM | #9 |
Thanks a million guys! (Especially you, Joseka) I got the trigger working right with the suggestions you gave me Joseka (I used the variable idea that was tossed out there, just for safety sake) Thanks again! Well... lets see if i can't find another trigger i need help with? |
