i been working on a map off and on when i have time been months since ive done anything to it but started working on it again to practice coding, will admit not the best at it i never took a class or anything so here is the issue i have, was working on a music easter egg and a few months ago had it working flawlessly but went back in and did some work on the map in radiant recompiled and did a test now the egg is broken a few issues the song does not play and one one of the two eggs it displays the message 3 times it should only display once it appears aside from that the code is fine no errors i tried a few things but nothing fixed it and hit a wall so here is the code i have the second egg playsound different just as a test to see if any changes so just ignore the difference ill copy and past the stuff i did below
thread not_egg_1();
thread not_egg_2();
thread not_egg_3();
thread not_egg_4();
thread not_egg_5();
thread egg2_test0();
thread egg2_test1();
thread egg2_test2();
level.not_egg_count = 0;
level.egg_test_count = 0;
not_egg_1()
{
not_egg1_trig = getEnt ("object1","targetname");
not_egg1_model = getEnt ("model1","targetname");
not_egg1_trig waittill ("trigger");
not_egg1_trig Delete();
not_egg1_model Delete();
level.not_egg_count ++;
iPrintLnBold("This Is Not An Easter Egg!!");
wait(5);
if (level.not_egg_count == 5)
{
level thread not_egg_finished();
}
}
not_egg_2()
{
not_egg2_trig = getEnt ("object2","targetname");
not_egg2_model = getEnt ("model2","targetname");
not_egg2_trig waittill ("trigger");
not_egg2_trig Delete();
not_egg2_model Delete();
level.not_egg_count ++;
iPrintLnBold("Whoops, Forgot the Message");
wait(5);
if (level.not_egg_count == 5)
{
level thread not_egg_finished();
}
}
not_egg_3()
{
not_egg3_trig = getEnt ("object3","targetname");
not_egg3_model = getEnt ("model3","targetname");
not_egg3_trig waittill ("trigger");
not_egg3_trig Delete();
not_egg3_model Delete();
level.not_egg_count ++;
iPrintLnBold("Keep trying You Won't Find Anything!!");
wait(5);
if (level.not_egg_count == 5)
{
level thread not_egg_finished();
}
}
not_egg_4()
{
not_egg4_trig = getEnt ("object4","targetname");
not_egg4_model = getEnt ("model4","targetname");
not_egg4_trig waittill ("trigger");
not_egg4_trig Delete();
not_egg4_model Delete();
level.not_egg_count ++;
iPrintLnBold("HUH?");
wait(5);
if (level.not_egg_count == 5)
{
level thread not_egg_finished();
}
}
not_egg_5()
{
not_egg5_trig = getEnt ("object5","targetname");
not_egg5_model = getEnt ("model5","targetname");
not_egg5_trig waittill ("trigger");
not_egg5_trig Delete();
not_egg5_model Delete();
level.not_egg_count ++;
iPrintLnBold("Keep trying You Won't Find Anything!!");
wait(5);
if (level.not_egg_count == 5)
{
level thread not_egg_finished();
}
}
//The Egg Has Been Completed So Now Do Something
not_egg_finished()
{
players = getPlayers();
for(i = 0; i < players.size; i++)
{
players
playSound("minorprofets" , "MITH" );
players
iPrintLnBold("The Minor Prophets");
wait(5);
players
iPrintLnBold("Haste The Day");
}
}
//music egg 2 test code
egg2_test0()
{
egg2_test0_trig = getEnt ("object6","targetname");
egg2_test0_model = getEnt ("model6","targetname");
egg2_test0_trig waittill ("trigger");
egg2_test0_trig Delete();
egg2_test0_model Delete();
level.egg_test_count ++;
iPrintLnBold("This Is Not An Easter Egg!!");
wait(5);
if (level.egg_test_count == 3)
{
level thread egg2_end();
}
}
egg2_test1()
{
egg2_test1_trig = getEnt ("object7","targetname");
egg2_test1_model = getEnt ("model7","targetname");
egg2_test1_trig waittill ("trigger");
egg2_test1_trig Delete();
egg2_test1_model Delete();
level.egg_test_count ++;
iPrintLnBold("This Is Not An Easter Egg!!");
wait(5);
if (level.egg_test_count == 3)
{
level thread egg2_end();
}
}
egg2_test2()
{
egg2_test2_trig = getEnt ("object8","targetname");
egg2_test2_model = getEnt ("model8","targetname");
egg2_test2_trig waittill ("trigger");
egg2_test2_trig Delete();
egg2_test2_model Delete();
level.egg_test_count ++;
iPrintLnBold("This Is Not An Easter Egg!!");
wait(5);
if (level.egg_test_count == 3)
{
level thread egg2_end();
}
}
egg2_end()
{
players = getPlayers();
for(v = 0; v < players.size; v++)
{
players[v] playSound("Dystopia");
wait(5);
players[v] iPrintLnBold("Dystopia");
wait(5);
players[v] iPrintLnBold("Megadeth");
}
}
is there something in this code that isnt correct that im missing or is the playsound set up wrong i do have 2 sounds in the alias i used the header from asylum and the first music line for the intro and modified it to reflect the songs i added and location again below
name,file,platform,sequence,vol_min,vol_max,dist_min,dist_max,limit_count,limit_type,entity_limit_count,entity_limit_type,bus,volume_min_falloff_curve,volumefalloffcurve,reverb_send,dist_reverb_max,reverb_min_falloff_curve,reverb_falloff_curve,pitch_min,pitch_max,randomize_type,spatialized,type,probability,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,chainaliasname,startdelay,speakermap,lfe percentage,center percentage,envelop_min,envelop_max,envelop percentage,occlusion_level,occlusion_wet_dry,real_delay,distance_lpf,move_type,move_time,min_priority,max_priority,min_priority_threshold,max_priority_threshold,,isbig
MITH,song\Dystopia.wav,,,1,1,,,,,,,music,,,,,,,,,,2d,streamed,,,,,,,,,,music_all,,,,,,0,,,,,,100,100,0.25,1,,
MITH,song\minorprofets.wav,,,1,1,,,,,,,music,,,,,,,,,,2d,streamed,,,,,,,,,,music_all,,,,,,0,,,,,,100,100,0.25,1,,
audio files are signed 16bit pcm using audacity and have all tags cleared as directed
any help would be great im lost on what else to do
Double Post Merge: October 12, 2020, 11:52:11 pm
fixed the above issue but now have a much more annoying one for some odd reason some iPrintlnbold messages pop up multiple times instead of the 1 time they should and the music plays but does more or less the same thing it starts the track about 3 times a few seconds apart and sounds aweful any ideas on why this may be happening