Go Back   Codemasters Forums > Action, RPG and Strategy Games > Operation Flashpoint: Dragon Rising > English > Operation Flashpoint: Dragon Rising - Mission Editing and Modding Chat Zone
Sign In
Register on CodeM

Operation Flashpoint: Dragon Rising - Mission Editing and Modding Chat Zone A little area for all you mission editors and modders to chat and discuss ideas.

Reply
 
LinkBack Thread Tools Display Modes
Old 12-11-2009, 11:51 AM   #1 (permalink)
Community Manager
 
Helios's Avatar
 
Join Date: Jan 2008
Location: United Kingdom, Rugby
Posts: 4,225
A COG representative has posted in this thread 12/11 - playOneShotSound.doc

Many thanks to the audio team for compiling this document!

The below document explains in-depth how to get pre existing sounds triggering in missions:

ftp://downloads.codemasters.com/word...eshotsound.zip

This thread is a response to some the questions asked in the below thread:
In-Game Sound Expert Needed
Helios is offline   Reply With Quote
Old 12-11-2009, 11:57 AM   #2 (permalink)
Senior Member
 
Talisa1811's Avatar
 
Join Date: Nov 2005
Location: Small Dole, UK
Posts: 639
Default

Awesome, gonna give this a go right now. Thanks Helios
__________________
Talisa

If in doubt, C-4 !

My SkyDrive OFP-DR Files
http://cid-c59474ce7ff81dd7.skydrive...sing%20Related
Talisa1811 is offline   Reply With Quote
Old 12-11-2009, 12:52 PM   #3 (permalink)
Member
 
Join Date: Oct 2009
Posts: 73
Default

Just a note. If you copy paste the test code provided in the help file:

function onEnter_triggerzone(zoneName, unitName)
{
-- OFP:destroyVehicle("vu01m1a2")
OFP: playOneShotSound ( “flashpoint2”, “exp”, “explosion”, 20734.0, 3.1, -2470.0, 0.1, 0.0, 0.0 )
}

You may see red lines under the code!

Just replace the commas ""

Must be a font issue.

T!nker is offline   Reply With Quote
Old 12-11-2009, 12:57 PM   #4 (permalink)
Senior Member
 
TemplarGFX's Avatar
 
Join Date: Oct 2009
Posts: 2,141
Default

yeah, in ASCII the “ and ” are different characters. and in the LUAsyntax file, it only has " which is yet another ASCII character
__________________
Island War - Free Roam Download Release Candidate here
The ENTIRE Island is at your feet! Explore, conquer, have fun! COOP with up to 3 friends!
----------------------------------------
Island War - Operation White Fang
Help your Company capture the White Fang Complex against EXTREME ODDS
----------------------------------------
Templar's Completely Awesome Entity Database
Real Muzzle Velocity, Rate Of Fire, Effective Range, Recoil. Better Aimed Position. No zooming on sights!
TemplarGFX is offline   Reply With Quote
Old 12-11-2009, 01:01 PM   #5 (permalink)
Member
 
Join Date: Oct 2009
Posts: 73
Default

Problem!

Code:
function onTimer_SetBoom()            
    --OFP:removeTimer("SetBoom");     
    i = math.random(1,12);                   
    chosen_boom = boom_list[i];        
    OFP:startParticleSystem(chosen_boom,1);
    OFP:setTimer("SetBoom", 9000);
end
How to apply it to random mines?

T!nker is offline   Reply With Quote
Old 12-11-2009, 01:04 PM   #6 (permalink)
Senior Member
 
TemplarGFX's Avatar
 
Join Date: Oct 2009
Posts: 2,141
Default

what do you mean sorry?
__________________
Island War - Free Roam Download Release Candidate here
The ENTIRE Island is at your feet! Explore, conquer, have fun! COOP with up to 3 friends!
----------------------------------------
Island War - Operation White Fang
Help your Company capture the White Fang Complex against EXTREME ODDS
----------------------------------------
Templar's Completely Awesome Entity Database
Real Muzzle Velocity, Rate Of Fire, Effective Range, Recoil. Better Aimed Position. No zooming on sights!
TemplarGFX is offline   Reply With Quote
Old 12-11-2009, 01:09 PM   #7 (permalink)
Member
 
Join Date: Oct 2009
Posts: 73
Default

When it chooses which of the 12 mines to activate, how to add sound. Thinking of

if chosen_boom = 1 then (play sound at boom 01 position)
if chosen_boom = 2 then (play sound at boom 02 position)
if chosen_boom = 3 then (play sound at boom 03 position)

etc

T!nker is offline   Reply With Quote
Old 12-11-2009, 01:30 PM   #8 (permalink)
Senior Member
 
TemplarGFX's Avatar
 
Join Date: Oct 2009
Posts: 2,141
Default

use

local x,y,z = OFP:getPosition(chosen_boom)

to get the coords to play the sound at
__________________
Island War - Free Roam Download Release Candidate here
The ENTIRE Island is at your feet! Explore, conquer, have fun! COOP with up to 3 friends!
----------------------------------------
Island War - Operation White Fang
Help your Company capture the White Fang Complex against EXTREME ODDS
----------------------------------------
Templar's Completely Awesome Entity Database
Real Muzzle Velocity, Rate Of Fire, Effective Range, Recoil. Better Aimed Position. No zooming on sights!
TemplarGFX is offline   Reply With Quote
Old 12-11-2009, 01:39 PM   #9 (permalink)
Member
 
Join Date: Oct 2009
Posts: 73
Default

Code:
function onTimer_SetBoom()            
    --OFP:removeTimer("SetBoom");     
    i = math.random(1,12);                   
    chosen_boom = boom_list[i];        
    OFP:startParticleSystem(chosen_boom,1);
    local x,y,z = OFP:getPosition(chosen_boom)
    OFP: playOneShotSound ( "flashpoint2", "exp", "explosion", "local x,y,z", 0.1, 0.0, 0.0 )
    OFP:setTimer("SetBoom", 9000);
end
Hmm, not working for me.
T!nker is offline   Reply With Quote
Old 12-11-2009, 01:42 PM   #10 (permalink)
Senior Member
 
Dru1d's Avatar
 
Join Date: Sep 2009
Posts: 224
Default

try
OFP: playOneShotSound ( "flashpoint2", "exp", "explosion", x,y,z, 0.1, 0.0, 0.0 )
Dru1d is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 08:13 PM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.