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