MoeBreach
Member-
Content Count
8 -
Joined
-
Last visited
-
Medals
Everything posted by MoeBreach
-
Problem with scripted tasks (condition to succeed)
MoeBreach posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, i have the following problem and cant find any solutions to get this working. The tasks are part of an random task script for select random tasks. My code for one of these tasks: _TaskID = TaskAlpha1; _TaskPosition = [17040.947,22001.61,1]; _TaskDescription = "Describe the task!"; _TaskTitle = "My name is task"; // Create the task [[west,["_TaskID"],[_TaskDescription, _TaskTitle, test], _TaskPosition,1,2,true], { _this call BIS_fnc_taskCreate; }] remoteExec ["call"]; // Create Hostage _grp = createGroup Civilian; _TaskID = _grp createUnit ["C_Man_casual_3_F", _TaskPosition, [], 0, ""]; _TaskID setbehaviour "CARELESS"; [_TaskID, true] call ACE_captives_fnc_setHandcuffed; // Task Conditions while {alive _TaskID} do { if ({!alive _x} count [_TaskID] == 0) then {hint "hes alive"}; sleep 1; }; [["_TaskID", "Succeeded"], { _this call BIS_fnc_taskSetState; }] remoteExec ["call"]; sleep 1; ["_TaskID"] call BIS_fnc_deleteTask; I think its an locality problem but i cant solve it, I hope someone of you can help me with this problem. Thanks in advance -
Problem with scripted tasks (condition to succeed)
MoeBreach replied to MoeBreach's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ive just tested your code on this way ;-) Oh sorry, yes i mean go back to lobby and back to game for testing it :-) -
Problem with scripted tasks (condition to succeed)
MoeBreach replied to MoeBreach's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ive copied your full code into initServer.sqf, init.sqf and initPlayerLocal.sqf and it wont work. Its only possible to complete the task while youre not reconnected (test for JiP.) Even if i exec it multiple times there are multiple tasks (if i reconnect i have 2 tasks. The one for the first connect, the second for the reconnect.) The second task works, the first not. Wheres my fail? :-( -
Problem with scripted tasks (condition to succeed)
MoeBreach replied to MoeBreach's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Meantime i think BIS Do not want contents created by player. I think its easier to study building skyscrapers than scripting in arma3 lawl. Ive googled 3 weeks for any solutions.. no usable results Ive asked friends who are scripting... no usable results Ive asked in a few forums (hx3.de, bis forums) ... no usable results Im really sad, because ive planed to create a really nice missiontemplate for random tasks, capture towns and so on but its impossible, because this damn task wont work. Even conditions like waituntil player distance target < 10 wont work. If nobody of you has an solution for my delicate situation i have to kill my project. -
Problem with scripted tasks (condition to succeed)
MoeBreach replied to MoeBreach's topic in ARMA 3 - MISSION EDITING & SCRIPTING
No chance. Ive executed the script from the INIT.sqf (this = [] execVM "test2.sqf";) and it dont work. After first spawn it creates the unit and the task works... if i do a reconnect, the task wont works, only the new generated task (like the first spawn.) The mission runs on dedicated Server btw. -
Problem with scripted tasks (condition to succeed)
MoeBreach replied to MoeBreach's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Mhm okay, thats strange :( for tests i call task.sqf with your code and call it with addaction and it wont work -
Problem with scripted tasks (condition to succeed)
MoeBreach replied to MoeBreach's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Looking good but wont work in jip :( -
Problem with scripted tasks (condition to succeed)
MoeBreach replied to MoeBreach's topic in ARMA 3 - MISSION EDITING & SCRIPTING
At first thanks a lot for the reply. I can see the task, also if i reconnect to the server, that should work. _TaskID is the id of the task and the name of the created unit which should be killed to complete the task. The unit spawns after activating the task. The idea is following: 1. Create task 2. Create Unit/Object ... which is the target of the task 3. Check the conditions (succeed, failed or still active) 4. Delete the task and delete all used stuff (optional) I want to use variables ´cause its much more easier for create a big amount of tasks (without changing a lot of values (copy and paste).) It would be nice if someone corrects the script for me (its much more easier to understand it.) Thanks a lot guys :)