16.09.2010, 22:04 | #1 (permalink) |
Problem mit Briefing im MP
Moin zusammen,
ich hab ein kleines Problem mit meinem Briefing im MP. Und zwar läd es wunderbar wenn jeder zum ersten mal auf die Karte connected aber sobald wer rejoint oder kurz trennt um Slot zu wechseln hat die Person kein ingame Briefing mehr. Ich rufe die Briefing.sqf in der init.sqf auf mit _temp = Player execVM "Briefing.sqf"; Wie kriege ich das hin das auch spieler die ReJoinen das Briefing weiterhin bekommen? Danke!!! Mfg Clawhammer
__________________
|
|
17.09.2010, 09:40 | #4 (permalink) |
Registriert seit: 02.07.2006
Ort: Kabul
Alter: 39
Beiträge: 2.666
|
kopiere folgendes an das ende in deiner briefing.sqf - (Ich hab den Code von missionen von Burns und Xeno ihren Breifing.sqf's)
Code:
if (isNil {player getVariable "mk_briefingEH"}) then { player addEventHandler ["killed",{[] spawn {waitUntil {alive player};execVM"briefing.sqf";};}]; player setVariable ["mk_briefingEH",true]; }; |
17.09.2010, 10:47 | #6 (permalink) |
Registriert seit: 12.05.2009
Ort: FRA
Beiträge: 1.621
|
So müsste es gehen(so ähnlich mach ich es auch immer)
init.sqf Code:
execVM "briefing.sqf"; 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 10:50 Uhr). |
17.09.2010, 16:32 | #9 (permalink) |
ja, das sind veraltete codeschnipsel aus dieser zeit (1.0-1.03), die heute keinen sinn mehr haben.
es sollte diese zeile am anfang des briefings reichen: Code:
waitUntil {!isNil {player}};
__________________
Niemand hat die Absicht eine Tüte zu bauen! ___<<<A3 Wounding System>>>___ |
|
17.09.2010, 17:32 | #10 (permalink) |
Registriert seit: 26.03.2008
Beiträge: 2.822
|
Die Zeile sollte schon hin, aber wenn man diese schon postet, dann doch bitte mit der richtigen Syntax
Code:
waitUntil {!(isNil player)}; Code:
waitUntil {!(isNull player)}; @Fogu: Ändere mal deine Briefing.sqf auf das hier ab: Code:
// since we're working with the player object here, make sure it exists waitUntil {!(isNull 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 { }; };
__________________
|
17.09.2010, 17:34 | #11 (permalink) |
Also isNil-Abfrage wär mir jetzt neu, vorallem, wenn player ein Engine Befehl ist.
Müsste eigentlich so genügen, und das extra neu-erstellen von dem Briefing nach dem Tod wird in jetztigen Patches wirklich nicht gebraucht. Oder bist du so bugverliebt PS: waitUntil {not (isNil player)} wird nicht funktionieren, da isNil nach undefenierten Variablen bzw. nil-Variablen fragt! |
|
17.09.2010, 17:38 | #12 (permalink) |
Registriert seit: 26.03.2008
Beiträge: 2.822
|
Am Anfang einer Mission funktioniert es schon, da player noch nicht vorhanden ist. Besser ist es aber, wenn man diesen Befehl benutzt: Code:
waitUntil {!(isNull player)};
__________________
|
17.09.2010, 17:38 | #13 (permalink) |
Registriert seit: 12.05.2009
Ort: FRA
Beiträge: 1.621
|
@Cyborg okay thx wird gemacht.
edit: lol in fast allen meiner Missionen ist es schon so Cyborg.... ....aber ich glaube wir hatten das Thema ja schon einmal.
__________________
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 17:44 Uhr). |
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1) | |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
Problem mit BattleEye und Mauseingabe! | GER_CJ-187 | Technische Fragen & Probleme | 2 | 29.08.2010 16:48 |
SIX Updater Problem | Nepharim | Technische Fragen & Probleme | 5 | 31.07.2010 16:05 |
ArmA2 OA Problem | Thunderbird | Technische Fragen & Probleme | 17 | 10.07.2010 19:15 |
description.ext (sound) problem | miromanu | Editing & Scripting | 7 | 07.07.2010 16:40 |
Problem beim entpacken von Pbo's | GER_CJ-187 | Technische Fragen & Probleme | 1 | 17.05.2010 22:03 |