function trees :: onLevelLoaded(%this) { %this.setLayer(31); } function trees:: onCollision(%srcObj, %dstObj, %srcRef, %dstRef, %time, %normal, %contacts, %points) { if(%dstObj.class $= "Player1") { alxStop($treesoundhandle); %srcObj.setLayer(28); %srcObj.setTimerOn(1000); $treesoundhandle = alxPlay(Thump); } else if(%dstObj.class $= "Player2") { alxStop($treesoundhandle); %srcObj.setLayer(28); %srcObj.setTimerOn(1000); $treesoundhandle = alxPlay(Thump); } else { return; } } function trees::onTimer(%this) { %this.setLayer(31); %this.setTimerOff(); }