Jump to content

revv

Member
  • Content Count

    92
  • Joined

  • Last visited

  • Medals

Everything posted by revv

  1. First, thanks for all the responses I did look up that block when you first gave it to me and I sort of understand what's happening and it is working as intended. I am absolutely trying to learn such stuff, I've only been at it for a few days now and I think I have achieved a great deal ;) Believe me when I say I am not asking at every step of my mission creation and I always bring up the wiki for every piece of code given to me and for every piece of code I am currently working on. There is much more going on that I haven't even shown you guys on here yet and I think I have achieved much in a very short amount of time (thanks to you guys of course!) I've spent pretty much every waking moment for the last 4 days studying and working on this mission and as I said I always bring up the wiki for everything I'm working on, even if I think I know it well I will still bring it up for reference in case I missed or forgot something. I don't stop and wait for responses on here either I will either keep working on the part I'm stuck on or move on to another part. I don't want you to think I'm lazy like that, I want to learn it so I can do it again and again because I love it. Joe98 & jshock I have actually got the marker being created and moved fine now I just need to get it to not move to the exact position of the crate so players have to search a little. I will change the title of the thread to reflect this :)
  2. First thanks for the response :) Yes it is to be run on a server, I have no idea how to make an sqf into a function ...still learning lol. Do you know of any good tutorials on how to do something like that? Jus to clarify I have everything working fine right now except for the marker and waypoint (task destination) are both being placed RIGHT on the ammobox1 EDIT: actually the marker is being placed exactly on the ammobox1 and the task destination is set to the marker. 2nd EDIT: also yes it's only one side BLUFOR, it's going to be a large-ish coop mission (sorta like patrol ops)
  3. I forgot to mention there is a trigger on map with radius set to 0 with this in its fields condition: !alive ammocrate1 ON ACT: hint "Operation Successful!"; task_1 setTaskState "Succeeded"; player removeSimpleTask task_1; 0 = [] execVM "scripts\initMissions.sqf"; This essentially removes the task that was completed and then runs the random picker again
  4. Hello all, as the title says I am trying to find the best method for detecting when I have destroyed a vehicle? In particular I am want this for an ammo crate called ammocrat1 for now but I would be wanting to reuse the code if possible for other entities such as a car or something later on too. It is for a server and is task related, I am also using a normal explosive to destroy the crate and I notice that after detonation the crate smokes for a few seconds then sinks into the terrain. Does this mean it is actually deleted/dead/destroyed? I have tried both of the following to detect and trigger the next task but to no avail. cache_A.sqf // Create weapon cache at random marker ammocrate1 = createVehicle ["B_supplyCrate_F",getMarkerPos "cache_1",["cache_2","cache_3"], 10, "NONE"]; // Create trigger for crate _trg = createTrigger ["EmptyDetector", getPos ammocrate1, true]; _trg setTriggerArea [5, 5, 0, false]; _trg setTriggerStatements [ "this", "!alive ammocrate1;", "task_1 setTaskState 'SUCCEEDED'; player setCurrentTask task_2; task_1 = true; publicVariable "task_1"; hint "Operation Success!";" ]; and // Create weapon cache at random marker ammocrate1 = createVehicle ["B_supplyCrate_F",getMarkerPos "cache_1",["cache_2","cache_3"], 10, "NONE"]; // Create trigger for crate if(isNull ammocrate1) then {hint "Operation Success!";}; I know the second is just a hint but it wont show either and I figure if I cant get a hint to show then it's not detecting the dead crate and wont spawn a trigger anyway Neither seem to work, any ideas? SOLVED: by simply placing a trigger on map with radius set to 0 then putting this in the following fields: CONDITION !alive ammocrate1 ON ACT hint "Operation Successful!"; task_1 setTaskState "Succeeded"; player removeSimpleTask task_1; 0 = [] execVM "scripts\initMissions.sqf";
  5. Well I couldn't get any script to do it so I have set up a trigger in the editor with radius set to 0 and set to NONE and NONE and just put in the condition field !alive ammocrate1 and in the activation field is just a hint for now but its working and its working REPEATEDLY in the correct way too lol. About to test it all on a server with a friend to make sure everything is syncing correctly now, wish me luck and thanks for your help mate!
  6. So after some tweaking I still cant get this to complete the task correctly. Script sequence is as follows: init.sqf (just the part relating to the missions) // Tasks fnc_miss_array = []; fnc_miss_array pushBack (compileFinal preprocessFileLineNumbers "scripts\mission_1.sqf"); fnc_miss_array pushBack (compileFinal preprocessFileLineNumbers "scripts\mission_2.sqf"); fnc_miss_array pushBack (compileFinal preprocessFileLineNumbers "scripts\mission_3.sqf"); fnc_miss_array pushBack (compileFinal preprocessFileLineNumbers "scripts\mission_4.sqf"); I have a box (temporary) with an addAction to get a mission Box init field: this allowDamage false; this addAction["<t color='#ff9900'>Get Mission</t>", "scripts\initMissions.sqf"]; that runs the initMissions.sqf which is: [] call (selectRandom fnc_miss_array); That picks a random mission from the array in the init.sqf The scripts listed in the array are all identical except some text for debugging, so they all run the tasks and a file called cache_A.sqf The mission_1.sqf "scripts\cache_A.sqf" remoteExec ["execVM",2]; switch (side player) do { case WEST: // BLUFOR briefing goes here { player createDiaryRecord ["Diary", ["*CHANGE ME*", "*debug 1*"]]; //Task1 - COMMENT task_1 = player createSimpleTask ["Mission 1"]; task_1 setSimpleTaskDescription ["This is mission 1 long description","Find Cache","Search"]; task_1 setSimpleTaskDestination (getMarkerPos "cache_A"); task_1 setTaskState "ASSIGNED"; ["TaskAssigned"] call BIS_fnc_showNotification; player setCurrentTask task_1; }; case EAST: // OPFOR briefing goes here { }; case RESISTANCE: // RESISTANCE/INDEPENDENT briefing goes here { }; case CIVILIAN: // CIVILIAN briefing goes here { }; }; So from here when I start the mission I can go to the box, use the action on it to get a random mission and the ammo crate spawns at a random marker but when I destroy the ammo crate nothing else happens. I'm assuming I forgot something with the tasks here but here is the final script called cache_A.sqf // Create weapon cache at random marker ammocrate1 = createVehicle ["B_supplyCrate_F",getMarkerPos "mrk_1",["mrk_1","mrk_1"], 0, "NONE"]; // Set Task State for crate _handle = [] spawn { waitUntil {!alive ammocrate1; sleep 0.5}; [task_1, "SUCCEEDED", true] call bis_fnc_tasksetstate; ["TaskSucceeded"] call BIS_fnc_showNotification; hint "Operation Success!"; }; Can anyone help please?
  7. In fact I think it is working and you are probably right about the task although Im not sure where I went wrong
  8. Okay well I will surely use your suggestion if I can get it working, here is my task system (which you've probably seen in other recent threads) init.sqf // Tasks fnc_miss_array = []; fnc_miss_array pushBack (compileFinal preprocessFileLineNumbers "scripts\mission_1.sqf"); fnc_miss_array pushBack (compileFinal preprocessFileLineNumbers "scripts\mission_2.sqf"); fnc_miss_array pushBack (compileFinal preprocessFileLineNumbers "scripts\mission_3.sqf"); fnc_miss_array pushBack (compileFinal preprocessFileLineNumbers "scripts\mission_4.sqf"); as of now just for testing purposes I have an addAction on a box to get a mission. In the init field of box in editor: this allowDamage false; this addAction["<t color='#ff9900'>Get Mission</t>", "scripts\initMissions.sqf"]; that obviously runs the initMissions.sqf which is as follows: [] call (selectRandom fnc_miss_array); which runs the selector in the init.sqf Each mission.sqf is the same right now just with different text in the description fields. mission_1.sqf "scripts\cache_A.sqf" remoteExec ["execVM",2]; switch (side player) do { case WEST: // BLUFOR briefing goes here { player createDiaryRecord ["Diary", ["*CHANGE ME*", "*debug 1*"]]; //Task1 - COMMENT task_1 = player createSimpleTask ["Mission 1"]; task_1 setSimpleTaskDescription ["This is mission 1 description","Find Cache","Search"]; task_1 setSimpleTaskDestination (getMarkerPos "cache_A"); task_1 setTaskState "Assigned"; taskhint ["Mission-1 Task-1", [1, 1, 1, 1], "taskNew"]; player setCurrentTask task_1; //Task2 - COMMENT task_2 = player createSimpleTask ["Exfil"]; task_2 setSimpleTaskDescription ["Leave area.","Exfiltrate","Exfil"]; task_2 setSimpleTaskDestination (getMarkerPos "cache_3"); task_2 setTaskState "created"; }; case EAST: // OPFOR briefing goes here { }; case RESISTANCE: // RESISTANCE/INDEPENDENT briefing goes here { }; case CIVILIAN: // CIVILIAN briefing goes here { }; }; and then the cache_A.sqf // Create weapon cache at random marker ammocrate1 = createVehicle ["B_supplyCrate_F",getMarkerPos "cache_1",["cache_2","cache_3"], 10, "NONE"]; // Create trigger for crate if(isNull ammocrate1) then {hint "Operation Success!";}; _trg = createTrigger ["EmptyDetector", getPos ammocrate1, true]; _trg setTriggerArea [5, 5, 0, false]; _trg setTriggerStatements [ "this", "!alive ammocrate1;", "task_1 setTaskState 'SUCCEEDED'; player setCurrentTask task_2; task_1 = true; publicVariable "task_1";" ]; I have cache_1 to cache_3 markers and a cache_A marker on the map. I did try your method but which ever one I can get working I'm going to use so I'm trying different things out :) EDIT: typo ini.sqf - init.sqf
  9. Hello I am trying to spawn an ammo crate at mission start and giving it a name so when it's destroyed the task sets to succeeded. Having trouble with giving it a name upon being created, anyone know how to do this? SOLVED (not sure how to edit title to say solved) This is the working script mission_1.sqf "scripts\cache_A.sqf" remoteExec ["execVM",2]; switch (side player) do { case WEST: // BLUFOR briefing goes here { player createDiaryRecord ["Diary", ["*CHANGE ME*", "*debug 1*"]]; //Task1 - COMMENT task_1 = player createSimpleTask ["Mission 1"]; task_1 setSimpleTaskDescription ["This is mission 1 description","Find Cache","Search"]; task_1 setSimpleTaskDestination (getMarkerPos "cache_1"); task_1 setTaskState "Assigned"; player setCurrentTask task_1; //Task2 - COMMENT task_2 = player createSimpleTask ["Exfil"]; task_2 setSimpleTaskDescription ["Leave area.","Exfiltrate","Exfil"]; task_2 setSimpleTaskDestination (getMarkerPos "cache_3"); task_2 setTaskState "created"; }; case EAST: // OPFOR briefing goes here { }; case RESISTANCE: // RESISTANCE/INDEPENDENT briefing goes here { }; case CIVILIAN: // CIVILIAN briefing goes here { }; }; cache_A.sqf // Create weapon cache at random marker ammocrate1 = createVehicle ["B_supplyCrate_F",getMarkerPos "cache_1",["cache_2","cache_3"], 10, "NONE"]; // Create trigger for crate _trg = createTrigger ["EmptyDetector", getPos ammocrate1, true]; _trg setTriggerArea [5, 5, 0, false]; _trg setTriggerStatements [ "this", "!alive ammocrate1;", "task_1 setTaskState 'SUCCEEDED'; player setCurrentTask task_2; task_1 = true; publicVariable "task_1"; hint "Operation Success!";" ]; The trigger part is not yet working though :( If someone could tell me how to mark the title as solved I would appreciate it!
  10. OMG facepalm! (it was late last night lol) THAT WORKED, it now spawns the crate, however the triggering of the task completion is not working after I destroy it. Thanks for pointing out that bracket!
  11. How do I mark this as solved?
  12. Yeah not sure about that, I think I need a different method of spawning it but can't figure it out.
  13. You could try making an addAction on a dummy object in the two areas and once both are placed create a radio trigger to detonate them, then have another trigger detecting if the dummy objects are destroyed and if they are trigger task completion? edit: typo
  14. I also forgot to mention the actual ammo crate spawning method. I have a file called cache_A.sqf // Create weapon cache at random marker ammocrate1 = createVehicle ["B_supplyCrate_F",getMarkerPos "cache_1",["cache_2","cache_3"], 5, "NONE"; // Create trigger for crate _trg = createTrigger ["EmptyDetector", getPos ammocrate1, true]; _trg setTriggerArea [5, 5, 0, false]; _trg setTriggerStatements [ "this", "!alive ammocrate1;", "task_1 setTaskState "SUCCEEDED"; player setCurrentTask task_2; task_1 = true; publicVariable "task_1"; hint "Operation Success!";" ]; I dont know if the trigger part works yet as the crate wont spawn.
  15. Ok mate thanks again! gonna get some shuteye then hit it again tomorrow. Thanks to both of you for all of your help :)
  16. Oh right, thanks mate! Edit: but you still answered ;) Thanks to both of you!
  17. Thank you, what is 2 and -2 at end of each line for? That seems great, is there a way I could make it execute the first selection at server start? for example make it pick one at server start and essentially begin the mission looping at launch and also would this be server/JIP friendly?
  18. Okay so now I have these 2 scripts: mission_1.sqf switch (side player) do { case WEST: // BLUFOR briefing goes here { player createDiaryRecord ["Diary", ["*ION Contractors*", "*Make sure you have all required equipment before heading out such as bandages, ammo, radio and earplugs!*"]]; //Task1 - COMMENT task_1 = player createSimpleTask ["Find The Weapon Cache"]; task_1 setSimpleTaskDescription ["Search for the weapon cache at the three locations, then destroy the cache.","Find Cache","Search"]; task_1 setSimpleTaskDestination (getMarkerPos "cache_1"); task_1 setTaskState "Assigned"; player setCurrentTask task_1; //Task2 - COMMENT task_2 = player createSimpleTask ["Exfil"]; task_2 setSimpleTaskDescription ["Leave area.","Exfiltrate","Exfil"]; task_2 setSimpleTaskDestination (getMarkerPos "cache_3"); task_2 setTaskState "created"; }; case EAST: // OPFOR briefing goes here { }; case RESISTANCE: // RESISTANCE/INDEPENDENT briefing goes here { }; case CIVILIAN: // CIVILIAN briefing goes here { }; }; and then cache_A.sqf // Create weapon cache at random marker ammocrate1 = createVehicle ["B_supplyCrate_F",getMarkerPos "cache_1",["cache_2","cache_3"], 5, "NONE"; // Create trigger for crate _trg = createTrigger ["EmptyDetector", getPos ammocrate1, true]; _trg setTriggerArea [5, 5, 0, false]; _trg setTriggerStatements [ "this", "!alive ammocrate1;", "task_1 setTaskState "SUCCEEDED"; player setCurrentTask task_2; task_1 = true; publicVariable "task_1"; hint "Operation Success!";" ]; What would the best way to execute these in a repeatable way, it's a persistent mission and the tasks are supposed to pop up randomly. I did have a read on publicVariable and remoteExec but it's a bit more advanced than my brain can handle this late at night so will have to study that tomorrow. If you can't or don't feel like explaining how to do this could someone point me to an example that's similar, I learn best from seeing the code structure in action so-to-speak. I forgot to mention this is in my init.sqf: //Tasks execVM "scripts\mission_1.sqf"; Temporary of course till I can figure out how to make more missions and then randomly pick one.
  19. Awesome and thank you both! Say if I didn't want this to all happen at server start but executed by a script that picks a random mission from a list so it could be run on repeat how could I do that?
  20. Okay, so should I change the start to something like: if (!isServer) exitWith {};
  21. Oops thanks! Ah it is spawning the crate Im just trying to figure out the best way to make it destroyed/deleted and then trigger the next task. trying to not use modules since the mission is supposed to be a persistant repeating mission on our server.
  22. So I am having a mission spawn the ammo crate using this in a "mission_1.sqf": waitUntil { !isNil {player} }; waitUntil { player == player }; ammocrate1 = createVehicle ["B_supplyCrate_F",getMarkerPos "cache_1",["cache_2","cache_3"], 0, "NONE"] switch (side player) do { case WEST: // BLUFOR briefing goes here { player createDiaryRecord ["BTA", ["ION Contractors", "Make sure you have all required equipment before heading out such as bandages, ammo, radio and earplugs!"]]; //Task1 - COMMENT task_1 = player createSimpleTask ["Find The Weapon Cache"]; task_1 setSimpleTaskDescription ["Search for the weapon cache at the three locations, then destroy the cache.","Find Cache","Search"]; //task_1 setSimpleTaskDestination (getMarkerPos "cache_1"); task_1 setTaskState "Assigned"; player setCurrentTask task_1; //Task2 - COMMENT }; case EAST: // OPFOR briefing goes here { }; case RESISTANCE: // RESISTANCE/INDEPENDENT briefing goes here { }; case CIVILIAN: // CIVILIAN briefing goes here { }; }; and I can't seem to figure out how to us the above code so I can name the crate, any help?
  23. Awesome thanks! So the "classname_blablubb" would be the ammobox classname which I can get form the editor I'm guessing? Also the square brackets is that where I can define pos (like a marker location?)
  24. revv

    Need operation buddies

    Hey we are looking for more people to join us, check our thread here: http://forums.bistudio.com/showthread.php?190850-BTA-Black-Talons-Australia&p=2919919#post2919919
  25. Welcome to the Black Talons Australia recruitment thread! We are a small unit dedicated to having fun & we are looking for more people to join us! We are currently running missions such as Patrol Ops, Hearts & Minds and sometimes we run the ALiVE missions we are also open to other suggestions. Mods currently running on our server are as follows: Latest @CBA_A3v1.1.20.150408 RC6: http://www.armaholic.com/page.php?id=18767 @RHSAFRF v0.3.6: http://www.rhsmods.org/ @RHSUSF: http://www.rhsmods.org/ @task_force_radio v0.9.7: http://radio.task-force.ru/en/ @ACE3 v0.0.1 unofficial release on Armaholic: http://www.armaholic.com/page.php?id=28557 @Bornholm: http://www.armaholic.com/page.php?id=27056 If you run ShackTacHUD (STHUD/ShackTacUI) like we do then you will have to rebind the ACE3 interaction key. Feel free to join our Teamspeak for more info: blacktalons.enjinvoice.com
×