| 08-12-2005, 02:04 PM | #1 | ||
I'm sure Lord Vexorian will know how to solve this one. I have 400 circles of power on my map, and I want a multiboard to show percents of the total each player has so I set it up like... Quote:
And to update it: Quote:
All that shows up is zeros all through column 2... help please? EDIT: I just want to clarify that my problem is in the Column 2 parts of the trigger in bold |
| 08-12-2005, 02:36 PM | #2 |
in the second trigger, you use last created multiboard, instead of that, set the multiboard to a variable in the first trigger and use that instead of last created multiboard for the second |
| 08-12-2005, 02:49 PM | #3 |
I only have one multiboard... I only create one, so i can refer to it like that. |
| 08-12-2005, 03:29 PM | #4 |
but i think the (last created ____) only refers to in the trigger. if i created a unit in one trigger, i can't use last created unit to get that same unit in another |
| 08-12-2005, 03:36 PM | #5 |
... the only part of the trigger that doesn't work is in column 2, so no you're wrong |
| 08-12-2005, 03:37 PM | #6 |
yes you can. edit: (yes you can was meant for duckduck) |
| 08-12-2005, 03:54 PM | #7 |
You need to do like this for each player. For Allplayer Integer A do For 1 to 400 Integer B do If Player Own CirclesOfPower[Integer B] Then set PlayerHas[Integer A] = PlayerHas[Integer A]+1 (ArrayOfIntegers) endloop endloop Then you calculate it from PlayerHas. |
| 08-12-2005, 05:39 PM | #8 |
what? i know how many circles of power each player has, the problem is that for somereason the math in the trigger doesnt work right and it comes out with 0 everytime in column 2 |
| 08-12-2005, 05:54 PM | #9 | ||
just so you know, WE rounds off in a bit different way than you do with money. Converting Real to Integer 0.99 gives 0 1.00 gives 1 1.01 gives 1 besides, dividing by (400 x 100), why not just dividing by 40000? one other little thing ive noticed. Quote:
this one was from the periodic event. Quote:
and this one from the elapsed game time event. the one below is first dividing by 400 and after that multipling by 100. and the other one isnt. |
| 08-12-2005, 06:23 PM | #10 | |||||
Quote:
I didn't realise WE rounded like that. Quote:
If you hadn't realised, i'm trying to find a percent. The total is 400 . If the player had 100 COP's then 100/400=.25 x 100 = 25 % Quote:
That shouldn't effect it. |
| 08-12-2005, 08:55 PM | #11 |
X / (400 * 100) = X / (40000) thats what i was trying to point out. the right one is 'slightly' faster. |
| 08-12-2005, 09:03 PM | #12 | |
Quote:
lol, it's not a noticible difference. |
| 08-12-2005, 09:09 PM | #13 |
thats why i said 'slightly' if you noticed. |
| 08-12-2005, 10:22 PM | #14 |
Last Created Multiboard And every Last Created XXXX are global variables |
| 08-12-2005, 10:37 PM | #15 | |
Quote:
do you have solution for my problem, vex? im kinda depending you for this one lol |
