1lokos
Sep-07-2017, 15:59
Before all, I am "Script illiterate" - just do cut & past of existing scripts. So "Linux style" advice will sound "Greek" for me. :D
I want use a script at end of mission to give a instruction for player.
With scripts I can play recorded voice messages (Speech folder) - but due limitation of this messages* I need mix their sound and on screen text.
* Rant ON: around 30% of recorded messages of Speech folder is for use in that disastrous Tiger Moth Flight School, and as CloD "It's CloD!" some messages names don't match with you hear.
For example: Return_to_base_I_repeat_return_to_home_base.ogg say "Get out there man, save yourself". :doh:
Seems that besides the voices in Speech folder are more locked files (SFS), named wrong.
Rant OFF :D
I manage to make a script that play voice and text message based on trigger.
public override void OnTrigger(int missionNumber, string shortName, bool active)
{
base.OnTrigger(missionNumber, shortName, active);
if ("trigger1".Equals(shortName) && active)
{
airc1.SayToGroup(airc1.AirGroup(), "Good_job1");
GamePlay.gpHUDLogCenter("Return to base");
GamePlay.gpGetTrigger(shortName).Enable = false;
GamePlay.gpGetTrigger("trigger2").Enable = false;
}
if ("trigger2".Equals(shortName) && active)
{
But I want to make a pause between the "Good job" - besides the sound that phrase is write in screen - and the "Return to base".
Without pause the "Good job" and "Return to base" is write simultaneous on screen, awkward.
In this code - for play sound messages (work OK), are a pause between two:
public override void OnTickGame() {
if (Time.tickCounter() == 50) {
double initTime = 0.0;
airc1.SayToGroup(airc1.AirGroup(), "My_engine_s_dead");
});
Timeout(initTime += 2.0, () => {
airc1.SayToGroup(airc1.AirGroup(), "Mayday_Mayday_I_m_going_down");
});
}
But I don't manage do add this pause in the first script. What do do?
BTW - I try record a specific message with online voice generator, save in .OGG, but CLoD play that sound very low (sound good in Desktop) and beside this I need use some of the existing message name for trigger this new, and now what you (barely) hear don't match with the text on screen... Not good idea.
I notice that game engine can tie 2 or more voice messages in one, e.g. "Vector + 1 + five zero", but don't discover how do this in script.
I want use a script at end of mission to give a instruction for player.
With scripts I can play recorded voice messages (Speech folder) - but due limitation of this messages* I need mix their sound and on screen text.
* Rant ON: around 30% of recorded messages of Speech folder is for use in that disastrous Tiger Moth Flight School, and as CloD "It's CloD!" some messages names don't match with you hear.
For example: Return_to_base_I_repeat_return_to_home_base.ogg say "Get out there man, save yourself". :doh:
Seems that besides the voices in Speech folder are more locked files (SFS), named wrong.
Rant OFF :D
I manage to make a script that play voice and text message based on trigger.
public override void OnTrigger(int missionNumber, string shortName, bool active)
{
base.OnTrigger(missionNumber, shortName, active);
if ("trigger1".Equals(shortName) && active)
{
airc1.SayToGroup(airc1.AirGroup(), "Good_job1");
GamePlay.gpHUDLogCenter("Return to base");
GamePlay.gpGetTrigger(shortName).Enable = false;
GamePlay.gpGetTrigger("trigger2").Enable = false;
}
if ("trigger2".Equals(shortName) && active)
{
But I want to make a pause between the "Good job" - besides the sound that phrase is write in screen - and the "Return to base".
Without pause the "Good job" and "Return to base" is write simultaneous on screen, awkward.
In this code - for play sound messages (work OK), are a pause between two:
public override void OnTickGame() {
if (Time.tickCounter() == 50) {
double initTime = 0.0;
airc1.SayToGroup(airc1.AirGroup(), "My_engine_s_dead");
});
Timeout(initTime += 2.0, () => {
airc1.SayToGroup(airc1.AirGroup(), "Mayday_Mayday_I_m_going_down");
});
}
But I don't manage do add this pause in the first script. What do do?
BTW - I try record a specific message with online voice generator, save in .OGG, but CLoD play that sound very low (sound good in Desktop) and beside this I need use some of the existing message name for trigger this new, and now what you (barely) hear don't match with the text on screen... Not good idea.
I notice that game engine can tie 2 or more voice messages in one, e.g. "Vector + 1 + five zero", but don't discover how do this in script.