This shows how each if will bring a copy of AddSoundObjectRec(1); and it will copy then increase each time. There is definitely a better way to write this that isn’t manual?
if(layeramount==1)
{
AddSoundObjectRec(1);
}
if(layeramount==2)
{
AddSoundObjectRec(1);
AddSoundObjectRec(2);
}
if(layeramount==3)
{
AddSoundObjectRec(1);
AddSoundObjectRec(2);
AddSoundObjectRec(3);
}