Einzelnen Beitrag anzeigen
Alt 17.09.2010, 09:47   #6 (permalink)
Fogu
500 Beiträge1000 Beiträge
 
Benutzerbild von Fogu
 
Registriert seit: 12.05.2009
Ort: FRA
Beiträge: 1.621
Standard

So müsste es gehen(so ähnlich mach ich es auch immer)
init.sqf
Code:
execVM "briefing.sqf";
briefing:
Code:
// since we're working with the player object here, make sure it exists
waitUntil { !isNil {player} };
waitUntil { player == player };
  
  
switch (side player) do 
{
    
    case WEST: // BLUFOR briefing goes here
    {
        player createDiaryRecord["Diary", ["Info", "<br/>Author - Jinef<br/>Version 1.00<br/>"]];
        player createDiaryRecord["Diary", ["Enemy forces", "<br/>Enemy forces are expected to consist of lightly armed locals mixed with trained regulars of the enemy. There are regular army aviation support and defence troops stationed at the airfield however after preliminary air strikes white flags have been seen, so we expect little resistance."]];
        player createDiaryRecord["Diary", ["Friendly forces", "<br/>1st Platoon will be deployed on the north flank. 2nd Platoon will capture the high ground overlooking the airfield. 3rd platoon will conduct the assault on the airfield.<br/><br/>Due to a risk of mines the first phase of the operation will be conducted dismounted only, the AAVs will hold the beach."]];
        player createDiaryRecord["Diary", ["Mission", "<br/>1st Platoon is to secure the northen flank of the island. This will be achieved by Alpha squad securing the town of Kamenyy, with Bravo and Charlie squads provding flank cover. Alpha squad will not proceed further than the limits of advance marked on your maps. 81mm mortar support is on call, however collateral damage is to be avoided at all costs."]];
        player createDiaryRecord["Diary", ["Situation", "<br/><img image='pic.jpg'/><br/><br/>Prior to our landing on the main island of Chenarus, our marine task force will secure the airfield on the small island of Utes. Our company will be performing the assault with support from the MEU task force units. The island is expected to be defended only very lightly by enemy forces with support from an disgruntled population. The key to our success is to quickly assert control over the island while maintaining civilian infrastructure and dignity."]];


        // Secondary Objective
        tskObj3 = player createSimpleTask["Secondary: Avoid Civilian Casualties"]; 
        tskObj3 setSimpleTaskDescription["The civilians here are relying on us to restore order and let them return to a peaceful life, we can't just blast our way through.", "Avoid Civilian Casualties", "Avoid Civilian Casualties"];            
        //>---------------------------------------------------------<
        // Secondary Objective
        tskObj2 = player createSimpleTask["Secondary: Avoid Friendly Casualties"]; 
        tskObj2 setSimpleTaskDescription["Let's not take any risks. It's not worth going home in a box for this. Stay frosty!", "Avoid Friendly Casualties", "Avoid Friendly Casualties"];
        //>---------------------------------------------------------<
        // Primary Objective
        tskObj1 = player createSimpleTask["Primary: Secure The Town"]; 
        tskObj1 setSimpleTaskDescription["Your squad has just landed on the beach <marker name='BAlpha'>here</marker>. Your task is to secure <marker name='BObj1'>this</marker> town ahead of the main landing force to ensure safe passage for further combat echelons. Meanwhile Bravo and Charlie squads will secure the enemy compounds on the flank and endeavour to prevent enemy reinforcments reaching the town.", "Secure The Town", "Secure The Town"];
        player setCurrentTask tskObj1;
    };
    
    
    case EAST: // REDFOR briefing goes here
    {
        
        
    };
    
    
    case RESISTANCE: // RESISTANCE/INDEPENDENT briefing goes here
    {
        
        
    };
    
    
    case CIVILIAN: // CIVILIAN briefing goes here
    {
        
        
    };
};



// run this file again when respawning (only setup the killed EH once though)
if ( isNil{player getVariable "mk_killedEHadded"} ) then 
{
    player addEventHandler ["killed", 
    { 
        [] spawn {
            waitUntil { alive player }; // waitUntil player has respawned
            execVM "briefing.sqf"; 
        };    
    }];
    player setVariable ["mk_killedEHadded", true];
};
__________________


My Youtube Channel

"Before you diagnose yourself with depression or low self esteem,
first make sure you are not, in fact, just surrounded by assholes!"
William Gibson

Geändert von Fogu (17.09.2010 um 09:50 Uhr).
Fogu ist offline