Hello everyone,
I've ran into a little problem, I work on a game with 3 game mode, cooperative, competitive and solo.
Cooperative and competitive are for 2-4 players
Solo is obviously for one player.
There's options for each mode (example a difficulty level for the solo mode) and these options needs to be displayed ONLY if the correct mode is selected.
So in gameoptions.inc.php I've put this :
In the doc it's said that startcondition prevent the game from starting if the conditions are not true.
But with this if competitive or cooperative is selected I can't :
- Change the players number to one
- Choose solo mode in the drop down menu
So it's before game start.
But if I put instead displayconditions with minplayers or maxplayers it doesn't do anything, all is displayed all the time.
Can you help me ?
Thanks in advance,
I've ran into a little problem, I work on a game with 3 game mode, cooperative, competitive and solo.
Cooperative and competitive are for 2-4 players
Solo is obviously for one player.
There's options for each mode (example a difficulty level for the solo mode) and these options needs to be displayed ONLY if the correct mode is selected.
So in gameoptions.inc.php I've put this :
Code: Select all
101 => array(
'name' => totranslate('Game Mode'),
'values' => array(
0 => array(
'name' => totranslate('Competitive (2-4 players)')
),
// A simple value for this option.
// If this value is chosen, the value of "tmdisplay" is displayed in the game lobby
1 => array(
'name' => totranslate('Solo')
),
2 => array(
'name' => totranslate('Coopérative (2-4 players')
),
),
'startcondition' => array(
0 => array(
array(
'type' => 'minplayers',
'value' => 2,
'message' => totranslate('Competitive game mode is available for 2 players minimum.')
)),
1 => array(
array(
'type' => 'maxplayers',
'value' => 1,
'message' => totranslate('Solo game mode is available for 1 player maximum.')
)
),
2 => array(
array(
'type' => 'minplayers',
'value' => 2,
'message' => totranslate('Cooperative game mode is available for 2 players minimum.')
)),
),
'default' => 0,
),
But with this if competitive or cooperative is selected I can't :
- Change the players number to one
- Choose solo mode in the drop down menu
So it's before game start.
But if I put instead displayconditions with minplayers or maxplayers it doesn't do anything, all is displayed all the time.
Can you help me ?
Thanks in advance,