My map is a 3v3 map. The idea is that if one or more players are nor present then they should be replaced with a computer that the other can control, everything works perfect on my computer but online then its different. Sometime it work and sometime some slots are not filled by computers.
From a distant it is difficult to check your trigger. There might be a strange side effect of some other trigger your have added, have you?
But I have noticed one serious logic mistake:
<<quote>>
general - if (conditions) then do action else do actions
if
number of player on team 1 < 3
then
...
if
number of player on team 1 < 2
then
....
if
number of player on team 1 < 1
then
...
The tests seems to be in a wrong order. I would have done it in another way
If x < 1
then
else if x < 2
then
else if x < 3
then
else
or even better it might be to use a switch condition
General - Switch (actions) depends on (number of players in team 1)
cases
(0)
...
(1)
...
(2)
...
(3)
...
(default)
...
This is faster for execution (does not really matter in game initialization). But it is easier to understand and easier to debug. At last ... there is a paste storage availabe. You could copy and paste your trigger script there. It is easier to check then a screenshot that does not even show the complete trigger. Only a suggestion ;)
"Controller Of Player" is an enum with
- Computer
- Hostile
- Neutral
- None
- Referee
- Spectator
In Sherlia's case this usage is correct. If you ask "(Player No) is in (Active Players) == TRUE", you are checking if this player is still engaged in the match (or if the player defeated).
Since Sherlia wants to activate a CPU player at the start of the match a test for a engaged/defeat condition would not make any sense here.
red dot means you have error there. It's not 100% accurate because sometimes it bugs out in bigger ifs/whiles etc and won't go out until you restart editor.
Within this part, there is no resaon for or gainst a CPU player. You only set up the team, the number of units, reveal an area and change the starting amount of minerals. There is no CPU player activation or anything AI concerning. Could you not just past the complete trigger to the paste storage? ... But maybe the mistake lies even somewhere else? There could be a small glitch in the player set up table, or ... or ... or !
Can you give us the name of your map, so we could download it? Then I could have a closer look at it, add a few debug ouput ... and hunt the bug down. Depending on the complexity of your changes in the editor. This could perhaps be done within 30 min or half a day. But If you are happy with getting an answer once or twice a day ... ;)
My map is a 3v3 map. The idea is that if one or more players are nor present then they should be replaced with a computer that the other can control, everything works perfect on my computer but online then its different. Sometime it work and sometime some slots are not filled by computers.
Here is the trigger tree
From a distant it is difficult to check your trigger. There might be a strange side effect of some other trigger your have added, have you?
But I have noticed one serious logic mistake:
<<quote>>
The tests seems to be in a wrong order. I would have done it in another way
or even better it might be to use a switch condition
This is faster for execution (does not really matter in game initialization). But it is easier to understand and easier to debug. At last ... there is a paste storage availabe. You could copy and paste your trigger script there. It is easier to check then a screenshot that does not even show the complete trigger. Only a suggestion ;)
What/who is "User"?
If you want to check is player really a human player you do (Player in player group) comparison using "Active players" as player group.
@Nerfpl: Go
"Controller Of Player" is an enum with
- Computer
- Hostile
- Neutral
- None
- Referee
- Spectator
In Sherlia's case this usage is correct. If you ask "(Player No) is in (Active Players) == TRUE", you are checking if this player is still engaged in the match (or if the player defeated).
Since Sherlia wants to activate a CPU player at the start of the match a test for a engaged/defeat condition would not make any sense here.
It looks like this now. Btw, whats the red dot on the icon general if (0), i have seen it from time to time but i i dont understand it.
This trigger work but i have not tested it online yet.
red dot means you have error there. It's not 100% accurate because sometimes it bugs out in bigger ifs/whiles etc and won't go out until you restart editor.
@Sherlia: Go
Within this part, there is no resaon for or gainst a CPU player. You only set up the team, the number of units, reveal an area and change the starting amount of minerals. There is no CPU player activation or anything AI concerning. Could you not just past the complete trigger to the paste storage? ... But maybe the mistake lies even somewhere else? There could be a small glitch in the player set up table, or ... or ... or !
Can you give us the name of your map, so we could download it? Then I could have a closer look at it, add a few debug ouput ... and hunt the bug down. Depending on the complexity of your changes in the editor. This could perhaps be done within 30 min or half a day. But If you are happy with getting an answer once or twice a day ... ;)
It's up to YOU.
He he, my sweet code, nono ;-)
I did some testing and it seams to work ok now when i changed to the switch thing, i need to test it more to confirm that ti really works.
Tested many times online now and it seams to be fine :)