AdmiralKarlDonuts 0 Posted January 11, 2005 How do I add that powerup sound to a helicopter? I pulled apart the USMC AH-1W Beta and the BAS Black Hawks - which both have it - and tried adding the relevant parts to my config, but no dice. Can someone post an example of how I might do this from scratch, without cutting up other people's scripts and configs? Many thanks. PS here's what I'm trying to make work: essentially copy/pasted from those aforementioned configs. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class EventHandlers { engine ="if (_this select 1) then {[_this select 0] exec ""\s84_uh1h\scripts\powerup.sqs""}"; }; class CfgSounds { class Powerup { sound[]={"\s84_uh1h\powerup.ogg",db-30,1}; name = "powerup"; titles[] = {}; }; }; Now to powerup.sqs... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_huey = _this select 0 ? (getpos _huey select 2) <2:_huey say "powerup" exit powerup.ogg is located in the root \s84_uh1h directory. It looks to me like this should all work, so I'm clueless. Share this post Link to post Share on other sites
csj 0 Posted January 12, 2005 Try this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">engine ="if (_this select 1) then {[_this select 0] exec {\s84_uh1h\scripts\powerup.sqs}}"; everything else looks ok. Share this post Link to post Share on other sites
bn880 5 Posted January 12, 2005 Looks okay, but your engine will start running imemdiately, and you just may not hear the sound over the regular engine one? Try a sidechat in your script. to debug Cheers Share this post Link to post Share on other sites
AdmiralKarlDonuts 0 Posted January 12, 2005 Hmmm, I tried the syntax CSJ suggested and added a debug globalchat....it seems that the script isn't being called at all. No error messages, but no sound and no globalchat. The investigation continues Share this post Link to post Share on other sites
Footmunch 0 Posted January 12, 2005 You've got the: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class EventHandlers { engine ="if (_this select 1) then {[_this select 0] exec ""\s84_uh1h\scripts\powerup.sqs""}"; }; inside the CfgVehicles definition of your unit, yep? And the CfgSounds outside? Share this post Link to post Share on other sites
AdmiralKarlDonuts 0 Posted January 12, 2005 You've got the:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class EventHandlers { engine ="if (_this select 1) then {[_this select 0] exec ""\s84_uh1h\scripts\powerup.sqs""}"; }; inside the CfgVehicles definition of your unit, yep? And the CfgSounds outside? Oooof...that was it. the eventhandlers were not in the right place. That's fixed it - thanks footmunch BTW how's the Mudhen coming? hehehe... Share this post Link to post Share on other sites