Hey guys, I'm almost done with the triggers for the map itself and found my multiboard only updates the kills value out of the 3 variables I'm using on it. Which is odd because I use the same methods for all three types. I know the editor doesn't require us to use player groups, but I'm just not seeing my error (probably too much time spent in the c compilers where there are no rules or hidden tricks).
That lead me to believe that it was the incrementing of the herolevel & herokill variable that was the issue ... I'm just not sure now. I program in C/php & the pseudo should be:
then the display updater should go something like this
event: unit dies
if: unit is hero, then increment herokills for "owner of killing unit"
else: increment kills for "owner of killing unit"
I'm doing this because I want the armies left when a player to leave to still be accounted for incase I decide at a later date to put AI for the leavers.
periodic: 20 sec
count "variable A" from 2 /*titles are in row 1*/ till "multiboard:number of rows"
set "last created multiboard" column 4 /*where the HKs are*/ to herokills array with index value of "variable A"
Time - Every 30.00 seconds of game timeWell, I'm going to go insert dummy values into my arrays and see if the display array is actually the issue...if it isn't then I just need some documentation on the player pick/matching functions :)For each (Integer A) from 2 to (Number of rows in (Last created multiboard)),do (Actions)Loop - Actions
Multiboard - Set the text for (Last created multiboard) item in column 1, row (Integer A) to (String(board_heroLevel[(Integer A)]))
Multiboard - Set the text for (Last created multiboard) item in column 4, row (Integer A) to (String(board_heroKills[(Integer A)]))
EDIT: my trigger for hero kill section, I broke the unit kill count part out to isolate so it won't match the pseudo code exactly.
((Triggering unit) is A Hero) Equal to True
If (((Killing unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) then do (Set board_heroKills[(Player number of (Owner of (Killing unit)))] = (board_heroKills[(Player number of (Owner of (Killing unit)))] + 1)) else do (Do nothing)|||I've found two inconsistancies...
The major issue is that, first - I have to stick a computer in the player slot in order for the triggers to work...why? Can this be corrected in map options somehow?
Second, it seems that the game when it starts does not reserve the player numbers 1 - 12 in the editor. Instead it seems to set "World Editor" to player 1 (even when I make myself player 2 or 3 which are on the same force). I am locking the teams already & starting positions...not sure if there's another setting I'm missing??|||Incase anyone else ever needs answers & because there's no testing guides really...I'll answer my own questions...
The triggers worked as intended - needed to ensure live players in there or computer controlled players was what was wrong.
No comments:
Post a Comment