Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [CVARINFO]
- user bool lca_legmusic = FALSE;
- [DECORATE]
- ACTOR MyZombieMan : ZombieMan {
- States
- {
- Spawn:
- TNT1 A 0
- TNT1 A 0 ACS_ExecuteAlways(333, 0, 5)
- Goto ZombieMan::Spawn
- }
- }
- ACTOR MyZombieMan2 : ZombieMan {
- States
- {
- Spawn:
- TNT1 A 0
- TNT1 A 0 ACS_ExecuteAlways(334, 0, 5)
- Goto Super::Spawn
- }
- }
- [SCRIPTS]
- #include "zcommon.acs"
- bool is_mon_music_playing = false;
- script 1 OPEN
- {
- Delay(70);
- SpawnSpotFacing("MyZombieMan", 1, 100);
- Delay(70);
- SpawnSpotFacing("MyZombieMan", 1, 101);
- }
- script 333 (int mnum) CLIENTSIDE
- {
- Delay(1);
- if (GetCVar("lca_legmusic") && !is_mon_music_playing)
- {
- SetMusic("D_DOOM");
- is_mon_music_playing = true;
- printbold(s:"playing music.");
- }
- else
- {
- printbold(s:"skipping music. lca_legmusic is ",i:GetCVar("lca_legmusic"),s:" and is_mon_music_playing is ",i:is_mon_music_playing);
- }
- }
- // Let's try non-CLIENTSIDE
- script 334 (int mnum)
- {
- Delay(1);
- if (GetCVar("lca_legmusic") && !is_mon_music_playing)
- {
- SetMusic("D_DOOM2");
- is_mon_music_playing = true;
- printbold(s:"playing music.");
- }
- else
- {
- printbold(s:"skipping music. lca_legmusic is ",i:GetCVar("lca_legmusic"),s:" and is_mon_music_playing is ",i:is_mon_music_playing);
- }
- }
- [PLAYER IN-GAME (ONLINE AND OFFLINE) CONSOLE]:
- lca_legmusic true
- [RESULTS]
- Always prints "skipping music. lca_legmusic is 0 and is_mon_music_playing is 0"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement