0 Members and 1 Guest are viewing this topic.
str BOSSSONG = "IBOSMUS1";//Change this to your boss theme.str VICSONG = "MM1VIC";//Change this to your victory theme.int serverMAX = 32;int Maxfrags;Bool BossMusic;script 203 (void){serverMAX = GetCVar("sv_maxclients");int modeofplay = ACS_ExecuteWithResult(975);bool isTeamGame = ACS_ExecuteWithResult(975,1);int LevelParTime = GetLevelInfo(LEVELINFO_PAR_TIME);Bool MoreFrags = False;If(Timer() < 105){terminate;}Switch(modeofplay) { Case 0: // DM / TDM Case 5: //Terminator too! if(GetCVar("fraglimit") <= 5){terminate;} If(IsTeamGame==0) { if(PlayerFrags() <= maxfrags){terminate;} maxfrags = PlayerFrags(); } If(IsTeamGame==1) { If(BlueScore() > maxfrags){maxfrags=BlueScore();MoreFrags=true;} If(RedScore() > maxfrags){maxfrags=RedScore();MoreFrags=true;} If(GetCvar("sv_maxteams") >=3) { If(OrangeFrags() > maxfrags){maxfrags=OrangeFrags();MoreFrags=true;} If(PurpleFrags() > maxfrags){maxfrags=PurpleFrags();MoreFrags=true;} } If(MoreFrags == False){terminate;} } if((MaxFrags >= GetCVar("fraglimit") - 5 && MaxFrags < GetCVar("fraglimit")) && BossMusic==0) { BossMusic=1; SetMusic(BOSSSONG); } if(MaxFrags >= GetCVar("fraglimit")&& BossMusic < 2) { BossMusic=2; SetMusic(VICSONG); } break; Case 1: //possession break; Case 2: //LMS / TLMS int BlueAlive=0; int RedAlive=0; int OrangeAlive=0; int PurpleAlive=0; int AlivePlayers=0; for(int i=0; i < ServerMAX; i++) { If(!PlayerInGame(i)){continue;} If(GetActorProperty(i+1000, APROP_HEALTH) > 0 || GetPlayerLivesLeft(i) > 0) { Switch(GetPlayerInfo(i, PLAYERINFO_TEAM)) { Case 0: BlueAlive++; break; Case 1: RedAlive++; break; Case 2: OrangeAlive++; break; Case 3: PurpleAlive++; break; Default: AlivePlayers++; break; } } } If(IsTeamGame == 0) { If(AlivePlayers <= 2 && BossMusic == 0) { BossMusic=1; SetMusic(BOSSSONG); } If(AlivePlayers == 1 && BossMusic == 1) { BossMusic=2; SetMusic(VICSONG); Delay(35*6); SetMusic("*"); } } If(IsTeamGame == 1) { If(BossMusic==0) { If(LMSBossCheck(BlueAlive, RedAlive, OrangeAlive,PurpleAlive)) { BossMusic=1; SetMusic(BOSSSONG); } } If(BossMusic==1) { If(((BlueAlive > 0) + (RedAlive > 0) + (OrangeAlive > 0) + (PurpleAlive > 0)) == 1) { BossMusic=2; SetMusic(VICSONG); Delay(35*6); SetMusic("*"); } } } break; Case 3: //Duel if(GetCVar("fraglimit") <= 1 || PlayerFrags() <= maxfrags){terminate;} maxfrags = PlayerFrags(); if((MaxFrags == GetCVar("fraglimit") - 1 && MaxFrags < GetCVar("fraglimit")) && BossMusic==0) { BossMusic=1; SetMusic(BOSSSONG); } if(MaxFrags >= GetCVar("fraglimit") && BossMusic < 2) { BossMusic=2; SetMusic(VICSONG); Delay(35*6); SetMusic("*"); } break; Case 4: // CTF if(GetCVar("pointlimit")<=1){terminate;} if((BlueScore() == GetCVar("pointlimit") - 1 || RedScore() == GetCVar("pointlimit") - 1) && BossMusic==0) { BossMusic=1; SetMusic(BOSSSONG); } if((BlueScore() == GetCVar("pointlimit") || RedScore() == GetCVar("pointlimit")) && BossMusic < 2) { BossMusic=2; SetMusic(VICSONG); } break; }}// Checks to see if there's a team with 1 player left and one team with 1 or greater.Function int LMSBossCheck (int blue, int red, int orange, int purple){int Check1;int Check2;If(blue == 1 || red == 1 || orange == 1 || purple == 1){Check1 = 1;}If(Blue == 0){Check2++;}If(Red == 0){Check2++;}If(Orange == 0){Check2++;}If(Purple == 0){Check2++;}Return(Check1 == 1 && Check2 >= 2);}//Blue and orange frag counters for TDMFunction int OrangeFrags(void){int O = ActivatorTID();int CossackFrags=0;For(int i = 0; i < ServerMAX; i++) { If(!PlayerInGame(i)){continue;} SetActivator(i+1000); If(GetPlayerInfo(i, PLAYERINFO_TEAM) == 2) { CossackFrags+=PlayerFrags(); } }SetActivator(O);return(CossackFrags);}Function int PurpleFrags(void){int O = ActivatorTID();int KingFrags=0;For(int i = 0; i < ServerMAX; i++) { If(!PlayerInGame(i)){continue;} SetActivator(i+1000); If(GetPlayerInfo(i, PLAYERINFO_TEAM) == 3) { KingFrags+=PlayerFrags(); } }SetActivator(O);return(KingFrags);}
Did you remember to include the line #include "zcommon.acs" at the top of your scripts file? I had a similar issue a while back, and it turned out I was missing that piece.
str BOSSSONG = "LDMBOSS2";str VICSONG = "LDMVIC";int bossMusic = 0;script 25 DEATH{int musiccheck = ACS_ExecuteWithResult(972);if(bossmusic!=musiccheck) { bossmusic=musiccheck; if(bossmusic==1) { SetMusic(BOSSSONG); } if(bossmusic==2) { SetMusic(VICSONG); } }}script 26 (int who) DISCONNECT{Delay(1);ACS_Execute(25, 0);}
The script in LegoPack is kind of finicky, it used a modified version of Core's boss music which required a special ACS compiler to set up. Since v4b is out, try compiling using the following script instead:Code: [Select]str BOSSSONG = "LDMBOSS2";str VICSONG = "LDMVIC";int bossMusic = 0;script 25 DEATH{int musiccheck = ACS_ExecuteWithResult(972);if(bossmusic!=musiccheck) { bossmusic=musiccheck; if(bossmusic==1) { SetMusic(BOSSSONG); } if(bossmusic==2) { SetMusic(VICSONG); } }}script 26 (int who) DISCONNECT{Delay(1);ACS_Execute(25, 0);}
Try loading with v4b since that's the version of the game we're using now.
Make sure v4b is loaded as a resource for Doom Builder and run the game from there.Do not load v4a alongside it.
Why is the pk3 loaded before the iwad?I mean...that might not impact anything, but...try changing the load order so that the iwad is first.
Hmm.Paste full script code here, please.Every single line. If you don't want to publicly, then PM me.
#include "zcommon.acs"//current_speed script 1 ENTER{int WaterType;int WaterGravity = 0;int i = 5;While(GetActorProperty(ActivatorTID(),APROP_HEALTH) >= 1) { WaterType = WaterCheck(); Switch (WaterType) { Case 1: If(WaterGravity == 1) { GiveInventory("NormalGravity",1); WaterGravity = 0; If(i<=0) { SpawnProjectile(0, "MMSplash",0,0,0,0,0); i=20; } } break; Case 2: If(WaterGravity == 0) { GiveInventory("LowGravity",1); WaterGravity = 1; If(i<=0) { SpawnProjectile(0, "MMSplash",0,0,0,0,0); i=20; } } break; } if(i > 0){i--;} Delay(1); }}script 2 RESPAWN{ACS_ExecuteAlways(1, 0);}Function int WaterCheck(void){If(ThingCountSector(T_NONE, ActivatorTID(), 1) && GetActorZ(0) < 248.0){Return 2;}If(ThingCountSector(T_NONE, ActivatorTID(), 2) && GetActorZ(0) < -16.0){Return 2;}Return 1;}str BOSSSONG = "IBOSMUS1";//Change this to your boss theme.str VICSONG = "MM1VIC";//Change this to your victory theme.int serverMAX = 32;int Maxfrags;Bool BossMusic;script 25 DEATH{int musiccheck = ACS_ExecuteWithResult(972);if(bossmusic!=musiccheck) { bossmusic=musiccheck; if(bossmusic==1) { SetMusic(BOSSSONG); } if(bossmusic==2) { SetMusic(VICSONG); } }}script 26 (int who) DISCONNECT{Delay(1);ACS_Execute(25, 0);}