03.10.2013, 09:57 | #1 (permalink) |
Registriert seit: 21.08.2013
Beiträge: 5
|
Lokale Variable per ParamsArray Definieren?
Hallo an alle, versuche mich seit kurzem im Arma editing und das Scripting macht mich noch irre..
Folgendes Problem: Ich benutze das AI Spawn Script Pack von fdsspun. Dort kann man den AI Skill wert im Synthax definieren. Ich würde den Skill wert aber Gerne über die Parameter bei Missionstart einstellen. Hier ein teil des Spawn Scripts: Code:
EXAMPLE: nul = [this,2,50,true,false,false,[10,0],0.1,[0.2,0.2,0.2,0.85,0.9,0.75,0.1,0.6,1,1],nil,nil,13] execVM "militarize.sqf"; will spawn 10 red team men, which will patrol in radius of 50m from the object this is called from */ if (!isServer)exitWith{}; private ["_greenCarArray","_blueMenArray2","_BLUarrays","_redMenArray2","_OPFarrays","_greenMenArray","_grpId","_customInit","_cPos","_skls","_skills","_maxD","_mi","_dir","_range","_unitType","_unit","_radius","_men","_vehicles","_still","_centerPos","_menAmount","_vehAmount","_milHQ","_milGroup","_menArray","_blueMenArray","_redMenArray","_yellowMenArray","_sideOption","_vehArray","_vi","_pos","_blueCarArray","_redCarArray","_yellowCarArray","_sPos","_vCrew","_allUnitsArray","_menRatio","_vehRatio","_sPos2"]; //Extra options: _smokesAndChems = true; _doorHandling = true; // _cPos = if(count _this > 0)then{_this select 0;}; _sideOption = if (count _this > 1) then { _this select 1; }else{2;}; _radius = if (count _this > 2) then { _this select 2; }else{150;}; _men = if (count _this > 3) then { _this select 3; }else{true;}; _vehicles = if (count _this > 4) then { _this select 4; }else{false;}; _still = if (count _this > 5) then { _this select 5; }else{false;}; _menRatio = if (count _this > 6) then { _this select 6; }else{0.3;}; _vehRatio = if (count _this > 7) then { _this select 7; }else{0.02;}; _skills = if (count _this > 8) then { _this select 8; }else{"default";}; _milGroup = if (count _this > 9) then { _this select 9; }else{nil;}; if(!isNil("_milGroup"))then{if(_milGroup == "nil0")then{_milGroup = nil;};}; _customInit = if (count _this > 10) then { _this select 10; }else{nil;}; if(!isNil("_customInit"))then{if(_customInit == "nil0")then{_customInit = nil;};}; _grpId = if (count _this > 11) then { _this select 11; }else{nil;}; Code:
//Enemy Skill == paramarray 5 title = " Set Enemy Skill"; values[] = {0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}; texts[] = {"0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1.0"}; default = 0.3; }; Code:
setskillparam = paramsarray select 5; Code:
nul = [this,2,50,true,false,false,[10,0],0.1,setskillparam,nil,nil,13] execVM "militarize.sqf"; Danke für eventuelle Hilfe.. Mfg.. |
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1) | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
RPT wird mit "Error Undefined variable in expression" überflutet | [GNC]Lord-MDB | Editing & Scripting | 32 | 24.08.2013 15:43 |
Lokale Variable für client erstellen? | Q_W_E_R | Editing & Scripting | 10 | 28.02.2013 23:16 |
Hint format: Variable ausgeben | Egosa-U | Editing & Scripting | 3 | 30.12.2011 07:23 |
WarefareBE 2.069 (Probleme) | Jackrkc | Usermade Missions | 6 | 22.07.2011 13:01 |
Missionsparameter Auswahl - paramsarray | Spiderman | Editing & Scripting | 14 | 19.01.2011 13:10 |