Jump to content

Valixx

Member
  • Content Count

    100
  • Joined

  • Last visited

  • Medals

Everything posted by Valixx

  1. Hey. Sry to bother you again. Detected another problem. If i come to the spawned crate the task is complete. If another soldier goes to the crate the task will not be updated. I have to go there..But in the code it is waitUntil { Player distance art < 10}; Every player should do the trick no? Here is one of the missions: /* ================================================================================================================== Create and spawn the Weapon Crate Task - Sidemission ================================================================================================================== */ fn_spawnCrateMission = { _smhint = "<t align='center' color='#ffffff' shadow='2' size='1.75'>Side Objective</t><br/><t align='center' color='#000000'>------------------------------</t><br/><t color='#ffffff' size='1.0'>Get to the weapon crates for more weapons and stuff.</t>"; GlobalHint = _smhint; publicVariable "GlobalHint"; hintsilent parseText _smhint; //creating the marker _marker = createMarker ["mob_wpcr", call fn_findMissionSpot]; _marker setMarkerType "mil_objective"; _marker setMarkerColor "ColorRed"; _marker setMarkerText "Weapon Crates"; _marker setMarkerSize [1,1]; _null = [west, "mob_wpcr", ["Get to the weapon crates for more weapons and stuff.", "Capture the Weapon Crates", "Capture the Weapon Crates"], getMarkerPos "mob_wpcr", false] spawn BIS_fnc_taskCreate; //creating the crates _veh = ["Box_NATO_Wps_F","Box_NATO_WpsSpecial_F","Box_NATO_Ammo_F","Box_NATO_AmmoOrd_F","Box_NATO_Grenades_F","Box_NATO_Support_F"] call BIS_fnc_selectRandom; art = createVehicle [_veh,[(getMarkerpos _marker select 0) + 30, getMarkerpos _marker select 1,0],[], 0, "NONE"]; ensoldier = [getMarkerPos _marker, east, (configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfTeam")] call BIS_fnc_spawnGroup; waitUntil { Player distance art < 10}; deleteMarker _marker; _null = ["mob_wpcr", "SUCCEEDED"] spawn BIS_fnc_taskSetState; _myHint ="Gear up soldier!!"; GlobalHint = _myHint; publicVariable "GlobalHint"; hintsilent parseText _myHint; _mySChat ="Excellent work, use it to your advantage!"; GlobalSCHat = _mySChat; publicVariable "GlobalSCHat"; player sideChat _mySChat; sleep 5; [west, "mob_wpcr"] call LARs_fnc_removeTask; hint ""; };
  2. Hey Larrow. I've tested it with my brother today and it works flawfless. I can't thank you enough for this.
  3. Thanks for "using" your free time for me. Very much appreciated! I'll test it tomorrow though.. and report back to you. Again, thanks!
  4. Thanks kylania. Like this, right? _smhint = "HINT TEXT"; GlobalHint = _smhint; publicVariable "GlobalHint"; hintsilent parseText _smhint; Awesome :D I have to read through the code above for a while, im not a pro.. so thanks Larrow. I'm waiting :P
  5. Valixx

    Time skip screen

    Bis_printText = { private["_blocks","_block","_blockCount","_blockNr","_blockArray","_blockText","_blockTextF","_blockTextF_","_blockFormat","_formats","_inputData","_processedTextF","_char","_cursorBlinks","_cursorInvis"]; _blockCount = count _this; _invisCursor = "<t color ='#00000000' shadow = '0'>_</t>"; //process the input data _blocks = []; _formats = []; { _inputData = _x; _block = [_inputData, 0, "", [""]] call BIS_fnc_param; _format = [_inputData, 1, "<t align = 'center' shadow = '1' size = '0.7'>%1</t><br/>", [""]] call BIS_fnc_param; //convert strings into array of chars _blockArray = toArray _block; {_blockArray set [_forEachIndex, toString [_x]]} forEach _blockArray; _blocks = _blocks + [_blockArray]; _formats = _formats + [_format]; } forEach _this; //do the printing _processedTextF = ""; { _blockArray = _x; _blockNr = _forEachIndex; _blockFormat = _formats select _blockNr; _blockText = ""; _blockTextF = ""; _blockTextF_ = ""; { _char = _x; _blockText = _blockText + _char; _blockTextF = format[_blockFormat, _blockText + _invisCursor]; _blockTextF_ = format[_blockFormat, _blockText + "_"]; //print the output [(_processedTextF + _blockTextF_), 0, 0.15, 5, 0, 0, 90] spawn BIS_fnc_dynamicText; playSound "click"; sleep 0.08; [(_processedTextF + _blockTextF), 0, 0.15, 5, 0, 0, 90] spawn BIS_fnc_dynamicText; sleep 0.02; } forEach _blockArray; if (_blockNr + 1 < _blockCount) then { _cursorBlinks = 5; } else { _cursorBlinks = 15; }; for "_i" from 1 to _cursorBlinks do { [_processedTextF + _blockTextF_, 0, 0.15, 5, 0, 0, 90] spawn BIS_fnc_dynamicText; sleep 0.08; [_processedTextF + _blockTextF, 0, 0.15, 5, 0, 0, 90] spawn BIS_fnc_dynamicText; sleep 0.02; }; //store finished block _processedTextF = _processedTextF + _blockTextF; } forEach _blocks; //clean the screen ["", 0, 0.15, 5, 0, 0, 90] spawn BIS_fnc_dynamicText; }; Bis_printSampleText = { titleCut ["", "BLACK FADED", 999]; _msg = [ ["CAMP ROGAIN, RESSUPLY POINT","<t align = 'center' shadow = '1' size = '0.7'>%1</t><br/>"], ["10 MINUTES LATER ...","<t align = 'center' shadow = '1' size = '1.0'>%1</t><br/>"] ] spawn Bis_printText; waitUntil{scriptDone _msg}; "dynamicBlur" ppEffectEnable true; "dynamicBlur" ppEffectAdjust [6]; "dynamicBlur" ppEffectCommit 0; "dynamicBlur" ppEffectAdjust [0.0]; "dynamicBlur" ppEffectCommit 5; titleCut ["", "BLACK IN", 5]; }; 0 = [] spawn BIS_printSampleText; Test this one. Maybe you forgot something to copy/paste or ....
  6. Hey guys. Again a question.. Everything is working fine, except one thing. Steps of how the script works. 1. A hint in-game appears to notify the players that a side mission will be activated in 5 minutes. 2. After the 5 minutes, the script spawns a side mission and updates the player's tasks. 3. After they succeeded the task, the players get a hint and the task will be deleted. ( Out of the task list when pressing M ) 4. Now the problem. When the side mission will be activated for the second time, the script does not add a task. The marker and everything appears and works except the adding task thing. Heres my code: // Mission _missionType = [_this, 0, ""] call BIS_fnc_param; sleep 10; hintSilent parseText format ["<t align='center' color='#fffff' shadow='2' size='1.75'>Side Objective</t><br/><t align='center' color='#000000'>------------------------------</t><br/><t color='#ffffff' size='1.0'>Starting in 5 Minutes</t>"]; sleep 300; fn_findMissionSpot = { private ["_mapCenter"]; _mapCenter = getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"); [_mapCenter, random 4000, random 360, false] call SHK_pos; }; fn_spawnArtyMission = { hintSilent parseText format ["<t align='center' color='#ffffff' shadow='2' size='1.75'>Side Objective</t><br/><t align='center' color='#000000'>------------------------------</t><br/><t color='#ffffff' size='1.0'>Capture the MK-6 Mortar and use it to your advantage.</t>"]; //creating the marker _marker = createMarker ["mob_arty", call fn_findMissionSpot]; _marker setMarkerType "mil_objective"; _marker setMarkerColor "ColorRed"; _marker setMarkerText "Mobile Artillery"; _marker setMarkerSize [1,1]; _null = [west, "mob_arty", ["Capture the MK-6 Mortar and use it to your advantage.", "Capture the MK-6 Mortar", "Capture the MK-6 Mortar"], getMarkerPos "mob_arty", false] spawn BIS_fnc_taskCreate; //creating the vehicle _veh = ["B_Mortar_01_F","B_Mortar_01_F"] call BIS_fnc_selectRandom; art = createVehicle [_veh,[(getMarkerpos _marker select 0) + 30, getMarkerpos _marker select 1,0],[], 0, "NONE"]; art setFuel 1; art setVehicleAmmo 1; waitUntil { Player distance art < 20}; deleteMarker _marker; _null = ["mob_arty", "SUCCEEDED"] spawn BIS_fnc_taskSetState; _myHint ="Destroy some stuff soldier!!"; GlobalHint = _myHint; publicVariable "GlobalHint"; hintsilent parseText _myHint; _mySChat ="Excellent work, use it to your advantage!"; GlobalSCHat = _mySChat; publicVariable "GlobalSCHat"; player sideChat _mySChat; sleep 5; player removeSimpleTask (["mob_arty",player] call bis_fnc_taskreal); // Delete task when done. hint ""; }; fn_spawnHeliMission = { hintSilent parseText format ["<t align='center' color='#ffffff' shadow='2' size='1.75'>Side Objective</t><br/><t align='center' color='#000000'>------------------------------</t><br/><t color='#ffffff' size='1.0'>A friendly heli is down. Get it for your Team!</t>"]; //creating the marker _marker = createMarker ["mob_heli", call fn_findMissionSpot]; _marker setMarkerType "mil_objective"; _marker setMarkerColor "ColorRed"; _marker setMarkerText "Abandoned Helicopter"; _marker setMarkerSize [1,1]; _null = [west, "mob_heli", ["Capture the abandoned Helicopter and use it to your advantage.", "Capture the abandoned helicopter", "Capture the abandoned helicopter"], getMarkerPos "mob_heli", false] spawn BIS_fnc_taskCreate; //creating the vehicle _veh = ["B_Heli_Transport_01_camo_F","B_Heli_Light_01_armed_F", "B_Heli_Light_01_F", "B_Heli_Attack_01_F"] call BIS_fnc_selectRandom; art = createVehicle [_veh,[(getMarkerpos _marker select 0) + 30, getMarkerpos _marker select 1,0],[], 0, "NONE"]; art setFuel 1; art setVehicleAmmo 1; waitUntil { Player distance art < 20}; deleteMarker _marker; _null = ["mob_heli", "SUCCEEDED"] spawn BIS_fnc_taskSetState; _myHint ="I hope you are a good pilot, soldier!!"; GlobalHint = _myHint; publicVariable "GlobalHint"; hintsilent parseText _myHint; _mySChat ="Excellent work, use it to your advantage!"; GlobalSCHat = _mySChat; publicVariable "GlobalSCHat"; player sideChat _mySChat; sleep 5; player removeSimpleTask (["mob_heli",player] call bis_fnc_taskreal); // Delete task when done. hint ""; }; // MAIN LOGIC _missionDetails = switch (_missionType) do { case "arty": {call fn_spawnArtyMission;}; case "heli": {call fn_spawnHeliMission;}; }; nul = [] execVM "ADG\missionfinder.sqf"; I thought the script works from top to bottom so that it adds the task everytime. What did i do wrong this time?
  7. Thanks Larrow. ____ Next post is at page 3.
  8. Well, then i'll have to take it like it is. Anyway, thank you kylania. :) PS: Is there a task limit in the game? Cheers, Valixx
  9. Thanks kylania. Is there a bis_fnc_.... to remove a task out of the task-list? I don't want to have a list with 30 tasks in a longer gaming session. The only thing about those bis_functions i can find are the 14 functions in the wiki. :/ Cheers, Valixx
  10. Kylania.. thanks again for this. Simply awesome! I've got another questions though, sry to bother you. I'm so far that the marker appears and the task is assigned to the player. When the player gets near the objective ( waitUntil { Player distance art < 20}; ) it's set to succeeded. Problem: I've tested this on lan with my brother and he's not getting the first task. We haven't tested if he gets the second though. I think some JIP thing right? Maybe i'll have to test with FHQ_TaskTracker. // Mission _missionType = [_this, 0, ""] call BIS_fnc_param; sleep random 60; fn_findMissionSpot = { private ["_mapCenter"]; _mapCenter = getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"); [_mapCenter, random 4000, random 360, false] call SHK_pos; }; fn_spawnArtyMission = { hint "Capture the Artillery!"; //creating the marker _marker = createMarker ["mob_arty", call fn_findMissionSpot]; _marker setMarkerType "mil_objective"; _marker setMarkerColor "ColorRed"; _marker setMarkerText "Mobile Artillery"; _marker setMarkerSize [1,1]; _task = player createsimpletask ["mob_arty"]; _task setsimpletaskdescription ["Capture the Artillery and use it to your advantage.", "Capture the Artillery", "Capture the Artillery"]; _task setsimpletaskdestination (getMarkerPos "mob_arty"); _task settaskstate "Created"; ["TaskCreated", ["Capture the Artillery"]] call bis_fnc_showNotification; //creating the vehicle _veh = ["B_Mortar_01_F","B_Mortar_01_F"] call BIS_fnc_selectRandom; art = createVehicle [_veh,[(getMarkerpos _marker select 0) + 30, getMarkerpos _marker select 1,0],[], 0, "NONE"]; art setFuel 1; art setVehicleAmmo 1; waitUntil { Player distance art < 20}; deleteMarker _marker; _task settaskstate "Succeeded"; ["TaskSucceeded", ["Capture the Artillery"]] call bis_fnc_showNotification; _myHint ="Destroy some stuff soldier!!"; GlobalHint = _myHint; publicVariable "GlobalHint"; hintsilent parseText _myHint; _mySChat ="Excellent work, use it to your advantage!"; GlobalSCHat = _mySChat; publicVariable "GlobalSCHat"; player sideChat _mySChat; sleep 3; hint ""; }; fn_spawnHeliMission = { hint "Capture the Heli!"; //creating the marker _marker = createMarker ["mob_heli", call fn_findMissionSpot]; _marker setMarkerType "mil_objective"; _marker setMarkerColor "ColorRed"; _marker setMarkerText "Abandoned Helicopter"; _marker setMarkerSize [1,1]; _task = player createsimpletask ["mob_heli"]; _task setsimpletaskdescription ["Capture the abandoned helicopter and use it to your advantage.", "Capture the Heli!", "Capture the Heli!"]; _task setsimpletaskdestination (getMarkerPos "mob_heli"); _task settaskstate "Created"; ["TaskCreated", ["Capture the Heli!"]] call bis_fnc_showNotification; //creating the vehicle _veh = ["B_Heli_Transport_01_camo_F","B_Heli_Transport_01_camo_F"] call BIS_fnc_selectRandom; art = createVehicle [_veh,[(getMarkerpos _marker select 0) + 30, getMarkerpos _marker select 1,0],[], 0, "NONE"]; art setFuel 1; art setVehicleAmmo 1; waitUntil { Player distance art < 20}; // If you read this, could we say like: If the heli is dead, then the scripts goes on...? deleteMarker _marker; _task settaskstate "Succeeded"; ["TaskSucceeded", ["Capture the Heli!"]] call bis_fnc_showNotification; _myHint ="I hope you are a good pilot, soldier!!"; GlobalHint = _myHint; publicVariable "GlobalHint"; hintsilent parseText _myHint; _mySChat ="Excellent work, use it to your advantage!"; GlobalSCHat = _mySChat; publicVariable "GlobalSCHat"; player sideChat _mySChat; sleep 3; hint ""; }; // MAIN LOGIC _missionDetails = switch (_missionType) do { case "arty": {call fn_spawnArtyMission;}; case "heli": {call fn_spawnHeliMission;}; }; nul = [] execVM "ADG\missionfinder.sqf"; If you know something, please give it to me. :)
  11. I tought i'm the only one with that. Apparently not^^
  12. We should use "BIS_fnc_MP" for "call RE" i think. I'm still learning Arma 3 scripting^^ So far i got this: // Mission _missionType = _this select 0; sleep random 15; fn_findMissionSpot = { //creating the position private ["_rad","_cnps","_hills","_hillcount","_hillnum","_hill","_marker","_boxes","_numb","_boxnum","_box"]; _rad=20000; _cnps = getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"); _hills = nearestLocations [_cnps, ["FlatArea"], _rad]; _hillcount = count _hills; _hillnum = floor (random _hillcount); _hill = _hills select _hillnum; //player sideChat format["Cnps: %1 Hills: %2 Cnt: %3 Num: %4 Result: %5", _cnps,_hills,_hillcount,_hillnum,_hill]; getPos _hill }; fn_spawnArtyMission = { hint "Capture the Artillery First!!!"; //creating the marker _marker = createMarker ["Mobile Artillery", call fn_findMissionSpot]; _marker setMarkerType "mil_destroy"; _marker setMarkerColor "ColorRed"; _marker setMarkerText "Mobile Artillery"; _marker setMarkerSize [1,1]; //creating the vehicle _veh = ["O_Mortar_01_F"] call BIS_fnc_selectRandom; art = createVehicle [_veh,[(getMarkerpos _marker select 0) + 30, getMarkerpos _marker select 1,0],[], 0, "NONE"]; art setFuel 1; art setVehicleAmmo 1; waitUntil { Player distance art < 20}; deleteMarker _marker; [player,nil,rSIDECHAT,"Excellent work,use it to your advantage"] spawn BIS_fnc_MP; [nil,nil,rHINT,"Destroy some shit soldier!!"] spawn BIS_fnc_MP; sleep 3; hint ""; }; // MAIN LOGIC _missionDetails = switch (_missionType) do { case "arty": {call fn_spawnArtyMission;}; // Ignoring the cases below for testing purposes. See if we can get one side mission to work. //case "tank": {call fn_spawnTankMission;}; //case "heli": {call fn_spawnTankMission;}; //case "truck": {call fn_spawnTruckMission;}; //case "c130wreck": {call fn_spawnTankMission;}; //case "harrier": {call fn_spawnHarrierMission;}; }; nul = [] execVM "ADG\missionfinder.sqf"; After changing some things in the code it marks the spot on the map. Well, no task/mortar etc. added at the moment. I'm working on it.
  13. That would be awesome indeed.
  14. Nope. I have to take a look on SHK_Taskmaster and see what i can find/get.
  15. Error is still there.. i'll try to make another mission ( without editing anything ) and see if it's some mistake on my side. Got the download from here: http://ferstaberinde.com/f3/en//index.php?title=Downloads Well.. no error with a non-edited version. Thanks anyway^^
  16. As far as i know, using if & then in a condition box of a trigger isn't that good. Of course i can be wrong about that... ehm... i'll test something and edit this post later.. brb
  17. Thanks for your answer. I'm using the VAS Script with the F3 Framework.
  18. ToM666, i can't answer you that question. :/ Got this all from kylania :D I've got 1 marker for 1 hint, so i can't help you with that one.
  19. http://forums.bistudio.com/showthread.php?160691-Triggered-messages&p=2458052&viewfull=1#post2458052 Guide from kylania.
  20. Valixx

    Time skip screen

    Thank you kylania.
  21. Valixx

    Underwater patrol script?

    Maybe you can achieve this without a script. Try placing the divers in the water and make it like him in the video. Worth a try, no? Cheers, Valixx
  22. Valixx

    Time skip screen

    Hey guys, sorry to "reopen" this thread but i've got a question. Can we build a sleep into this code, so that when the message fully appeared it should stay there a while, let's say for 5 seconds and then disappear? Maybe: Bis_printSampleText = { titleCut ["", "BLACK FADED", 999]; _msg = [ ["CAMP ROGAIN, RESSUPLY POINT","<t align = 'center' shadow = '1' size = '0.7'>%1</t><br/>"], ["10 MINUTES LATER ...","<t align = 'center' shadow = '1' size = '1.0'>%1</t><br/>"] ] spawn Bis_printText; //sleep here? waitUntil{scriptDone _msg}; // or here? "dynamicBlur" ppEffectEnable true; "dynamicBlur" ppEffectAdjust [6]; "dynamicBlur" ppEffectCommit 0; "dynamicBlur" ppEffectAdjust [0.0]; "dynamicBlur" ppEffectCommit 5; titleCut ["", "BLACK IN", 5]; }; Cheers, Valixx
  23. Hey Grillob. You have to put getMarkerColor "markername" == "ColorGreen" in the condition box of the trigger, and in the onAct box: Hint "Successfully cleared the town, good job soldiers!"; And if you want to end the mission with that trigger, choose #END1 as the type. Cheers, Valixx
×