Hey guys,
I am computing light maps for the ground never done light maps before so I have discovered something new!
As for coop I have never created a coop map before so would not know where to start but I am sure with the right brains it would be possible!
I have tried to add TDMC.c mode. However, when finalizing the mission I get an error message,
Line 1
message parse error.
I created a map using this scrip back in the day, but have not got a clue how I done it or got it to work.
This time I have copied the script into levels/map name/data/scripts
Then went to multiplayer editor
new mode custom selected the script set the parameters.
Parse error? It looks like you have not complete your script, maybe some bracket is missing at the end of script or something wrong in header. Check your script, maybe download it again... Can you post it here?
int ScriptMain(s_SC_NET_info *info){
s_SC_MP_SRV_settings SRVset;
s_SC_MP_EnumPlayers enum_pl[64];
s_SC_MP_Recover *precov;
s_SC_MP_hud hudinfo;
s_SC_P_getinfo plinfo;
s_SC_HUD_MP_icon icon[2];
int i, j, sideA, sideB;
switch(info->message){
case SC_NET_MES_SERVER_TICK:
// server tick, this part of the code is executed on server side only ( dedicated and no-dedicated too)
switch(gEndRule){
case SC_MP_ENDRULE_TIME:
if (gPlayersConnected>0) gTime += info->elapsed_time;
SC_MP_EndRule_SetTimeLeft(gTime,gPlayersConnected>0);
if (gTime>gEndValue){
SC_MP_LoadNextMap();
return TRUE;
}
break;
case SC_MP_ENDRULE_FRAGS:
if (((gSideFrags[0]>0)&&(gSideFrags[0]>=gEndValue)) || ((gSideFrags[1]>1)&&(gSideFrags[1]>=gEndValue))){
SC_MP_LoadNextMap();
return TRUE;
}
break;
for (i=0;i<gRecs;i++)
gRecTimer[i] -= info->elapsed_time;
j = 64;
if (SC_MP_EnumPlayers(enum_pl,&j,SC_MP_ENUMPLAYER_SIDE_ALL)){
if ((j==0)&&((gSideFrags[0]+gSideFrags[1])!=0)){
gSideFrags[0] = 0;
gSideFrags[1] = 0;
UpdateSideFrags();
}// if ((side[0]+side[1])==0)
}
gPlayersConnected = j;
break;
case SC_NET_MES_CLIENT_TICK:
// client tick, this part is executed on client only ( including client on no-dedicated server)
gCLN_SideFrags[0] = SC_ggi(GVAR_SIDE0FRAGS);
gCLN_SideFrags[1] = SC_ggi(GVAR_SIDE1FRAGS);
SC_MP_SetSideStats(0,gCLN_SideFrags[0],0);
SC_MP_SetSideStats(1,gCLN_SideFrags[1],0);
for (i=0;i<2;i++){
icon[i].type = SC_HUD_MP_ICON_TYPE_NUMBER;
icon[i].icon_id = 3*i;
icon[i].value = gCLN_SideFrags[i];
icon[i].color = 0xffffffff;
}
SC_MP_SetIconHUD(icon,2);
break;// SC_NET_MES_CLIENT_TICK
case SC_NET_MES_LEVELPREINIT:
// is called before level.c SC_LEV_MES_INITSCENE is called
// use it for set gametype and some basic setting that has to be done before scene initialization
SC_sgi(GVAR_MP_MISSIONTYPE,GVAR_MP_MISSIONTYPE_TDM);
gEndRule = info->param1;
gEndValue = info->param2;
gTime = 0.0f;
SC_MP_EnableBotsFromScene(FALSE);
break;// SC_NET_MES_LEVELPREINIT
case SC_NET_MES_LEVELINIT:
// initialization
SC_MP_SRV_SetForceSide(0xffffffff);
SC_MP_SetChooseValidSides(3);
// Set class limits for DM
SC_MP_SRV_SetClassLimitsForDM();
// Enable soldiers and disable DM classes
SC_MP_SRV_SetClassLimit(1, 64); // US Soldier
SC_MP_SRV_SetClassLimit(21, 64); // VC Soldier
SC_MP_SRV_SetClassLimit(19, 0); // US DM
SC_MP_SRV_SetClassLimit(39, 0); // VC DM
CLEAR(hudinfo);
hudinfo.title = 1051;
hudinfo.sort_by[0] = SC_HUD_MP_SORTBY_FRAGS;
hudinfo.sort_by[1] = SC_HUD_MP_SORTBY_KILLS;
hudinfo.sort_by[2] = SC_HUD_MP_SORTBY_DEATHS | SC_HUD_MP_SORT_DOWNUP;
hudinfo.sort_by[3] = SC_HUD_MP_SORTBY_PINGS | SC_HUD_MP_SORT_DOWNUP;
hudinfo.pl_mask = SC_HUD_MP_PL_MASK_FRAGS | SC_HUD_MP_PL_MASK_KILLS | SC_HUD_MP_PL_MASK_DEATHS;
hudinfo.use_sides = TRUE;
hudinfo.side_name[0] = 1010;
hudinfo.side_color[0] = 0x440000ff;
hudinfo.side_name[1] = 1011;
hudinfo.side_color[1] = 0x44ff0000;
hudinfo.side_mask = SC_HUD_MP_SIDE_MASK_FRAGS;
SC_MP_HUD_SetTabInfo(&hudinfo);
SC_MP_AllowStPwD(TRUE);
SC_MP_AllowFriendlyFireOFF(TRUE);
SC_MP_SetItemsNoDisappear(FALSE);
if (info->param2){
if (info->param1){
// it's server
SC_MP_GetSRVsettings(&SRVset);
// Disable weapons placed on the map
SC_MP_SRV_InitWeaponsRecovery((float)SRVset.dm_weap_resp_time);
//SC_MP_SRV_InitWeaponsRecovery(-1.0f);
SC_MP_Gvar_SetSynchro(GVAR_SIDE0FRAGS);
SC_MP_Gvar_SetSynchro(GVAR_SIDE1FRAGS);
UpdateSideFrags();
gRecs = 0;
i = REC_MAX - gRecs;
SC_MP_GetRecovers(SC_MP_RESPAWN_DM,&gRec[gRecs],&i);
gRecs += i;
if (gRecs==0) SC_message("no recover place defined!");
CLEAR(gRecTimer);
}// if (info->param1)
}//if (info->param2)
break;// SC_NET_MES_LEVELINIT
case SC_NET_MES_RENDERHUD:
// is called on every client in every frame - enables rendering some on screen info
break;
case SC_NET_MES_SERVER_RECOVER_TIME:
// game engine asks server for time to respawn selected player
if (info->param2){
info->fval1 = 0.1f;
}
else {
// killed
info->fval1 = 5;
}
break;
case SC_NET_MES_SERVER_RECOVER_PLACE:
// game engine asks for place where to recover some player
precov = (s_SC_MP_Recover*)info->param2;
i = SC_MP_SRV_GetBestDMrecov(gRec,gRecs,gRecTimer,NORECOV_TIME);
gRecTimer[i] = NORECOV_TIME;
*precov = gRec[i];
break;
case SC_NET_MES_RESTARTMAP:
// command restart map came
gTime = 0;
CLEAR(gSideFrags);
UpdateSideFrags();
SC_MP_SRV_ClearPlsStats();
SC_MP_SRV_InitGameAfterInactive();
SC_MP_RecoverAllNoAiPlayers();
break;// SC_NET_MES_RESTARTMAP
case SC_NET_MES_RULESCHANGED:
// command change end rule came
gEndRule = info->param1;
gEndValue = info->param2;
gTime = 0.0f;
break;
case SC_NET_MES_SERVER_KILL:
// some player is killed, check autobalance for example, or score points etc
SC_P_GetInfo(info->param1,&plinfo);
sideA = plinfo.side;
if (info->param2){
SC_P_GetInfo(info->param2,&plinfo);
sideB = plinfo.side;
}
else sideB = 0xffffffff;
if (sideA==sideB){
gSideFrags[sideB]--;
}
else{
if (sideB!=0xffffffff) gSideFrags[sideB]++;
}
UpdateSideFrags();
break;// SC_NET_MES_SERVER_KILL
}// switch(info->message)
return 1;
}// int ScriptMain(void)
I have had a look through and I cant seem to find anything...it has been a while since I looked at anything like this. My spare time is now spent building towers with my kids and washing lol!!!
Also does anyone have the DMC script file or can help me in altering the TDMC file so it can be used as DMC.
Thank you
GeMzY