Get SaintAxe&Ror SpeechMaker Now And build your conversations easily ! |
How to integrate the conversations you build in Mission Editor
In Mission Editor :
- In the Create panel, click the Systems tab
- Expand Scripting folder
- Place a Level Script on your map . (This is level.lua script)
- Place a Library Script on your map
- Select the Library Script and on the Modify panel, go to Lua Script and select ConvLib in Script Name combo list.
Add the code below in the level.lua script
conversations = scripts.library.convLib.convLib:new();
speech();
In SAR SpeechMaker :
Build conversations and click the "Show" button.
Then click the "Copy to Clipboard" button
Back to Mission Editor :
Paste the data from the clipboard at the end of the level.lua script
(This is a sample code from SaintAxe&Ror Operation Squirrel)
-- SPEECHS
-- =============================================================================
function speech()
spDisembark = conversations:add({
{actor = "player", say = "or_disembark_pl"}, -- Disembark
}, true);
spBoardTheVehicle = conversations:add({
{actor = "player", say = "or_board_veh_pl"}, -- Board the vehicle
}, true);
spBeachSecure = conversations:add({
{actor = "player", say = "inf6_03_hun_01"}, -- The beach is clear, move to ...
}, true);
spApproachBeach = conversations:add({
{actor = "radio", say = "inf6_01_hun_01"}, -- We're opening a new front.
}, true);
spAaaEliminated = conversations:add({
{actor = "player", say = "inf6_09_hun_01"}, -- All hostile triple A eliminated.
}, true);
spFuelSecure = conversations:add({
{actor = "player", say = "m01_adline04"}, -- Fuel Depot Secured. All Ene...
}, true);
spGoMonastery = conversations:add({
{actor = "radio", say = "inf7_01_hun_01"}, -- Ok, we've got an update on the ...
{actor = "player", say = "inf5_07_hun_03"}, -- These guys have no idea what's ...
}, true);
spSamOut = conversations:add({
{actor = "player", say = "dem1_08_m06_01"}, -- The SAM site has been eliminated.
{actor = "player", say = "inf5_07_m01_02"}, -- Oorah!
}, true);
spEnd = conversations:add({
{actor = "player", say = "inf8_15_mas_02"}, -- Congratulations, gentlemen. You'...
{actor = "player", say = "spc2_12_m06_01"}, -- On the move.
}, true);
Finally, add the code below :
Now you can call the conversations like below in any of the functions you use in the level.lua script
