| 04-12-2005, 01:03 AM | #1 |
The multiboard doesn't update like it should, u can mostly just disregard everything except the mutliboard update part but I left it in incase somone wanted to see the rest. There are no bugs in the Set Lives trigger as I made a test trigger to display the value in game. The multiboard IS set to a varible called Mutliboard just incase anyone thought differently. Any help is appreciated, thx. Code:
Respawns
Events
Unit - A unit Dies
Conditions
Actions
Set Lives[(Player number of (Owner of (Triggering unit)))] = (Lives[(Player number of (Owner of (Triggering unit)))] - 1)
Game - Display to (All players) the text: (String(Lives[1]))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Lives[(Player number of (Owner of (Triggering unit)))] Greater than 0
Then - Actions
Unit - Create 1 Villager (Male) for (Owner of (Triggering unit)) at (Center of Start Region <gen>) facing Default building facing degrees
Game - Display to (All players) the text: ((Name of (Owner of (Triggering unit))) + looses 1 life!)
Else - Actions
Game - Display to (All players) the text: ((Name of (Owner of (Triggering unit))) + looses!)
For each (Integer A) from 1 to 9, do (Actions)
Loop - Actions
Multiboard - Set the text for Multiboard item in column 2, row 0 to (String(Lives[(Integer A)])) |
| 04-12-2005, 02:27 AM | #2 | |
Quote:
take note what you wrote expanded out into full form: Integer A = 1 Multiboard - Set the text for Multiboard item in column 2, row 0 to (String(Lives[1])) increment Integer A = 2 Multiboard - Set the text for Multiboard item in column 2, row 0 to (String(Lives[2])) increment Integer A = 3 Multiboard - Set the text for Multiboard item in column 2, row 0 to (String(Lives[3])) etc... Integer A = 9 Multiboard - Set the text for Multiboard item in column 2, row 0 to (String(Lives[9])) hence at the end of the trigger, multiboard item in column 2, row 0 will contain Lives[9] no matter what |
| 04-12-2005, 02:48 AM | #3 |
Er, I dont get it =/ could you explain more plz? EDIT: ok I see whatcha mean but how do I avoid that, do I have to do it the long way or can I still use a for int a loop? |
| 04-12-2005, 04:21 AM | #4 |
well whats the multiboard suppose to look like? is it suppose to be For each (Integer A) from 1 to 9, do (Actions) ++++Loop - Actions ++++++++Multiboard - Set the text for Multiboard item in column 2, row (Integer A) to (String(Lives[(Integer A)])) ? i don't know what your multiboard is suppose to look like, but that would make each row in column 2 display a different player's lives (row 1 through 9 respectively) |
| 04-12-2005, 04:11 PM | #5 |
it is supposed to look like this Player 1 | player 1 lives Player 2 | player 2 lives Player 3 | player 3 lives etc... | etc... Player 9 | player 9 lives |
| 04-12-2005, 07:00 PM | #6 |
well you have to do what i said and change the rows as you go through the loop, if u read what i've told you about your problem, right now you're sending each player's lives to only column 2 row 0 -- row 0 is the first row |
| 04-12-2005, 08:34 PM | #7 |
but row 0 effects all the rows, it starts at row 1 but the WE says if u put 0 it willl effect all rows...so wouldn't it loop? or maybe I have to but row int A...yeah...anyways u have been very helpful in my questions so a rep or two will be added ^_^ EDIT: hmm didnt work...I'll try some other things tho |
| 04-12-2005, 09:04 PM | #8 | |
Quote:
even if row 0 is all rows then you're doing it to all rows 9 times putting the value lives[9] in EVERY row all rows does not mean the game will automatically know to put the next value in the next row, all rows literally means put the value in all of them at the same time |
| 04-12-2005, 09:13 PM | #9 |
nvm I changed varible for wrong trigger, just realized that. for int a works and I gave u rep for being patient with me hehe. |
