Hallo Leute und Willkommen auf meinem HOWTO bzw. Tutorial!
Achja, jetzt fangen die ganzen Entwickler an, Custom Maps für Altis Life zu benutzen, doch da gibt es einen hacken, DER SPAWNPUNKT.
Viele von euch müssten wissen, das Altis Life so aufgebaut ist, das man im Editor nur einen Marker platzieren muss, wie z.B. civ_spawn_1 für Kavala.
Diese definiert man dann im \Dialog\Functions\fn_spawnPointCfg.sqf jeweils mit Namen, Markernamen und Icon.
Ihr habt euch doch sicher gewundert, wieso man immer wenn man auf die Insel spawnt, jedesmal in verschiedene Häuser erscheint.
Das hat einen Grund, die Entwickler von Altis Life haben Classnames von den Gebäuden entnommen und diese in der Config \Core\fn_initCiv.sqf mit den Spawnmarkern "Verknüpft".
So sollte man in den verschiedenen Häusern spawnen, damit verhindert man auch, das zu viele Idle Spieler auf einem Fleck sitzen.
Welche Configs schauen wir uns an heute?
fn_spawnPointCfg.sqf
fn_initCiv.sqf
So dann fangen wir mal mit der fn_spawnPointCfg.sqf an:
//Spawn Marker, Spawn Name, PathToImage
switch (_side) do
{
case west:
{
_return = [
["cop_spawn_1","Sydney PS","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["cop_spawn_2","Melbourne PS","\a3\ui_f\data\map\MapControl\fuelstation_ca.paa"],
["cop_spawn_3","Perth PS","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"],
["cop_spawn_4","Darwin PS","\a3\ui_f\data\map\Markers\NATO\b_air.paa"],
["cop_spawn_5","HW Patrol","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"]
];
};
case civilian:
{
_return = [
["civ_spawn_1","Sydney","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["civ_spawn_2","Melbourne","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["civ_spawn_3","Perth","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["civ_spawn_4","Darwin","\a3\ui_f\data\map\MapControl\watertower_ca.paa"]
];
if(count life_houses > 0) then {
{
_pos = call compile format["%1",_x select 0];
_house = nearestBuilding _pos;
_houseName = getText(configFile >> "CfgVehicles" >> (typeOf _house) >> "displayName");
_return pushBack [format["house_%1",_house getVariable "uid"],_houseName,"\a3\ui_f\data\map\MapControl\lighthouse_ca.paa"];
} foreach life_houses;
};
};
case independent: {
_return = [
["medic_spawn_1","Sydney Hospital","\a3\ui_f\data\map\MapControl\hospital_ca.paa"],
["medic_spawn_2","Melbourne Hospital","\a3\ui_f\data\map\MapControl\hospital_ca.paa"],
["medic_spawn_3","Perth Hospital","\a3\ui_f\data\map\MapControl\hospital_ca.paa"],
["medic_spawn_4","Darwin Hospital","\a3\ui_f\data\map\MapControl\hospital_ca.paa"]
];
};
};
_return;
Alles anzeigen
So schaut die komplette Config aus, hier wird halt definiert, welche Marker auf der Map aktiv sind bzw. wie sie im Spawn Menü heissen und ausschauen. Hier könnt ihr auch die Icons verändern.
Diese werden auch in 3 Standart Fraktionen unterteilt. Ihr könnt beliebig viele Markers setzen, nur vergisst nicht diese auch zu definieren.Verstanden? Ok gut dann ab zur nächsten Config.Jetzt zeige ich euch mal die fn_initCiv.cfg:
/*
File: fn_initCiv.sqf
Author: Bryan "Tonic" Boardwine
Description:
Initializes the civilian.
*/
private["_spawnPos"];
civ_spawn_1 = nearestObjects[getMarkerPos "civ_spawn_1", ["Land_i_Shop_01_V1_F","Land_i_Shop_01_V2_F","Land_i_Shop_01_V3_F","Land_i_Shop_02_V1_F","Land_i_Shop_02_V2_F","Land_i_Shop_02_V3_F"],250];
civ_spawn_2 = nearestObjects[getMarkerPos "civ_spawn_2", ["Land_i_Shop_01_V1_F","Land_i_Shop_01_V2_F","Land_i_Shop_01_V3_F","Land_i_Shop_02_V1_F","Land_i_Shop_02_V2_F","Land_i_Shop_02_V3_F"],250];
civ_spawn_3 = nearestObjects[getMarkerPos "civ_spawn_3", ["Land_i_Shop_01_V1_F","Land_i_Shop_01_V2_F","Land_i_Shop_01_V3_F","Land_i_Shop_02_V1_F","Land_i_Shop_02_V2_F","Land_i_Shop_02_V3_F"],250];
civ_spawn_4 = nearestObjects[getMarkerPos "civ_spawn_4", ["Land_i_Shop_01_V1_F","Land_i_Shop_01_V2_F","Land_i_Shop_01_V3_F","Land_i_Shop_02_V1_F","Land_i_Shop_02_V2_F","Land_i_Shop_02_V3_F"],250];
waitUntil {!(isNull (findDisplay 46))};
if(life_is_arrested) then {
life_is_arrested = false;
[player,true] spawn life_fnc_jail;
} else {
[] call life_fnc_spawnMenu;
waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open.
waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done.
};
player addRating 9999999;
Alles anzeigen
Verwirrend? Garnicht! Da habe ich gerademal 10 Minuten gebraucht, um es zu begreifen.
civ_spawn_1 = nearestObjects[getMarkerPos "civ_spawn_1", ["Land_i_Shop_01_V1_F","Land_i_Shop_01_V2_F","Land_i_Shop_01_V3_F","Land_i_Shop_02_V1_F","Land_i_Shop_02_V2_F","Land_i_Shop_02_V3_F"],250];
Zuerst sieht man den Markername, dann fängt er mit nearestObjects an, die in der nähe verfügbaren Classnames bzw. Gebäuden als Spawnpunkte zu setzen. Z.B. Land_i_Shop_01_V1_F wäre ein Haus mit einem Shop im Erdgeschoss.
GANZ WICHTIG. Wenn ihr eine Custom Map benutzt, müsst ihr entweder diese Classnames durch die Gebäuden ersetzen, die ihr verfügbar habt. Oder ihr löscht alle Zeilen, die mit der Markernamen anfangen raus. So spawnen die Spieler sonst nur auf euren gesetzten Marker.
-----------------------------------------------------------------
So ich hoffe ich konnte euch weiterhelfen, falls meine Rechtschreibung scheisse sein soll, das ist mir egal
Wenn ich kompletten Müll gelabert haben soll bzw. was vergessen habe zu erwähnen, korrigert mich bitte und ich passe diese Erklärung auch demtentsprechend ab! pleasantry
Liebe Grüße, Exodoos!