golfpro1286
Member-
Content Count
22 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout golfpro1286
-
Rank
Private First Class
-
Need help with objective completions.
golfpro1286 replied to golfpro1286's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yes it is actually a full on co-op mission. I will read through that thread and try to get this fixed. and yeah that one was just a paste error. Thanks for your help! Update: After reading through the thread that you linked, I have a better idea of what I need to do, just not really sure how to do it lol. I wish I had my laptop with me at work today so I could try some of this. I am wary of even posting a guess at how to code this as my other posts have been so jumbled but I will try it anyways (just don't laugh too hard at this). So I need to have the co-op team move to pick up an evidence file. In that file is intel that points to a target, the task is to find and kill him. Then evidence on the target leads to another group of targets to be killed. To start the mission with the task set for all players to collect evidence I have this in the init.sqf: execVM "briefing.sqf"; In the "biefing.sqf" file is this code: //objective 1 tskEvidence1 = player createSimpleTask["Collect Evidence"]; tskEvidence1 setSimpleTaskDescription ["Locate Evidence Folder at Ramon's Villa.", "Collect Evidence", "Collect Evidence"]; tskEvidence1 setSimpleTaskDestination (getMarkerPos "evid1"); Here is where I get a little lost and I feel is where the problems start. So I place an object named evid1 with this in the init field: (the addaction is local and needs to be attached to a public even handler?) this addaction ["Collect evidence!", "collect.sqf"]; If I am reading all of this correctly the collect.sqf file only runs on the machine of the player who picks the file up and needs to be attached to a public even handler to run on all machines no matter who picks it up right? (not sure how to do that) In the collect.sqf file is this code: deletevehicle evid1; tskEvidence1 setTaskState "SUCCEEDED"; setCurrentTask tskobj_test; tskobj_test = true; publicVariable "tskobj_test"; So assuming that the above issues are solved I want to move on to creating the next task when tskEvidence1 is complete. So then instead of having a trigger to create a new task when tskevidence1 is done, I make a task called tskobj_test using the init.sqf file and a new "tskobj_test.sqf" file to create the new task as such: updated thought: Maybe I need a trigger where cond is taskcompleted tskEvidence1; with onAct: "tskobj_test" addPublicVariableEventHandler {[] execVM "tskobj_test.sqf";}; So in the init.sqf "tskobj_test" addPublicVariableEventHandler { // Assign and Succeed the task:"tsakobj_test". tskobj_test = player createSimpleTask ["Kill NSK"]; tskobj_test setSimpleTaskDescription ["The file shows NSK has taken over the Vatra airport and turned it into his military compound. Find and eliminate him."]; tskobj_test setTaskState "Assigned"; tskobj_test setTaskState "Succeeded"; // Show message. taskhint ["The file shows NSK has taken over the Vatra airport and turned it into his military compound. Find and eliminate him."]}; then in a file named tskobj_test.sqf I put this code in: // Assign and Succeed the task:"tsakobj_test". tskobj_test = player createSimpleTask ["Kill NSK"]; tskobj_test setSimpleTaskDescription ["The file shows NSK has taken over the Vatra airport and turned it into his military compound. Find and eliminate him."]; tskobj_test setTaskState "Assigned"; tskobj_test setTaskState "Succeeded"; // Show message. taskhint ["The file shows NSK has taken over the Vatra airport and turned it into his military compound. Find and eliminate him."]; now to complete this task a unit named "nsk" must be killed so in a trigger I put this: cond: !alive nsk; onAct: "test" objStatus "DONE"; tskobj_test setTaskState "SUCCEEDED"; player setCurrentTask tskobj_3; obj_3 = true; publicVariable "tskobj_3"; "tskobj_3" addPublicVariableEventHandler {[] execVM "tskobj_3.sqf"; So I THINK the next step is to set up the publicvariable "tskobj_3". so in the init.sqf I put this: "tskobj_3" addPublicVariableEventHandler { // Assign and Succeed the task:"tsakobj_3". tskobj_3 = player createSimpleTask ["search NSK's Body"]; tskobj_3 setSimpleTaskDescription ["Verify NSK's death by taking his dogtags, also search for any other items of interest."]; tskobj_test setTaskState "Assigned"; tskobj_test setTaskState "Succeeded"; // Show message. taskhint ["Verify NSK's death by taking his dogtags, also search for any other items of interest."]}; Then in the tskobj_3.sqf: { // Assign and Succeed the task:"tsakobj_3". tskobj_3 = player createSimpleTask ["search NSK's Body"]; tskobj_3 setSimpleTaskDescription ["Verify NSK's death by taking his dogtags, also search for any other items of interest."]; tskobj_test setTaskState "Assigned"; tskobj_test setTaskState "Succeeded"; // Show message. taskhint ["Verify NSK's death by taking his dogtags, also search for any other items of interest."]}; LMAO my brain is fried, could not get past this, please help! I am almost 100% positive that I messed that up beyond all recognition and probably caused myself more harm than good! But I like to learn by trial and error. Thanks again for the help and the patience! -
Need help with objective completions.
golfpro1286 replied to golfpro1286's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Alright so I was FINALLY able to test this and the event handlers seem to be working, however I am now having trouble with my very first task. It will assign the first task to all players at the start of the mission, however, only the player that completes it gets the task updated and message displayed. I know the event handlers are working becuase during the test I completed the first task and was the only one to see the message and have the new task set. I then had the other player complete the next task, at which point I was able to see the message and have the task updated. So my theory is that something is happening with my code for the first task being completed Here is what I have; The first task is set up to be complete when an evidence file is picked up. I placed an object on the map named "evid1" and in its init field this: this addaction ["Collect evidence!", "collect.sqf"]; In collect.sqf I have this: deletevehicle evid1; tskEvidence1 setTaskState "SUCCEEDED"; [objNull, ObjNull, tskEvidence1, "SUCCEEDED"]; setCurrentTask tskobj_test; tskobj_test = true; publicVariable "tskobj_test"; To start the task I used the briefing.sqf and init.sqf In init.sqf: execVM "briefing.sqf"; BIS_Effects_Burn = compile preprocessFileLineNumbers "\ca\Data\ParticleEffects\SCRIPTS\destruction\burn.sqf"; i=[mi8,10,time,false,false] spawn BIS_Effects_Burn; "tskobj_test" addPublicVariableEventHandler {hint "tskobj_test" addPublicVariableEventHandler {hint "The file contains evidence that suggests that NSK and his army have taken over the Vatra airport and turned it into their military compound! Find him and kill him!"}; "tskobj_3" addPublicVariableEventHandler {hint "tskobj_3" addPublicVariableEventHandler {hint "Verify NSK's death by taking his dogtags, also search for any other items of interest"}; "tskobj_4" addPublicVariableEventHandler {hint "tskobj_4" addPublicVariableEventHandler {hint "After examining the photo evidence recovered from NKS's corpse it is apparent a new group of hostiles only known as 'O4V' has started construction of a massive base at the smuggler's airport. Seek out and destroy the leaders of the group to maintain BSA dominance of Panthera Island. Stand by for 'O4V' leader intel."}; "tskobj_metalhead" addPublicVariableEventHandler {hint "tskobj_metalhead" addPublicVariableEventHandler {hint "Check your tasks for 'O4V' leader hit list. Eliminate them all with extreme prejiduce!"}; [] execVM "halo.sqf"; In the briefing.sqf I have this: player createDiaryRecord ["Diary", ["Collect Evidence File.", "Ace has tipped BSA off that he is in possession of dispathes that woudld be of great interest to the team! All BSA members need to report to base immediately for departure. Mission objectve: collect, examine, and act upon the information in the evidence file, good luck BSA!"]]; //objective 1 tskEvidence1 = player createSimpleTask["Collect Evidence"]; tskEvidence1 setSimpleTaskDescription ["Locate Evidence Folder at Ramon's Villa.", "Collect Evidence", "Collect Evidence"]; tskEvidence1 setSimpleTaskDestination (getMarkerPos "evid1"); Can you see what may be causing this problem? Thanks! -
Can you spot my problem?
golfpro1286 replied to golfpro1286's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yeah those were corrected even before I posted this, it didn't work. I think the problem has to lie in the completion of tskobj_2 somehow. When I shoot him it says "objective complete" however it does not mark the task as complete or create the new one. This game is so frustrating lol. -
So my mission used to work, but now something has gone wrong. I was hoping you guys could help me spot the error. So here is what is happening (or not happening I guess); My mission is to go collect evidence, when the folder is picked up it identifies a target to go kill. That works fine, the task is created using this code in trigger: Condition: taskCompleted tskEvidence1 ; On Act: tskobj_2 = player createSimpleTask ["Kill NSK."]; tskobj_2 setSimpleTaskDescription ["Evidence file obtained, NSK and his army has taken over the Vatra Airport. Find and eliminate him..","Kill NSK","Kill NSK"]; tskobj_2 setSimpleTaskDestination markerpos ""; player setCurrentTask tskobj_2; tskobj_2 = true; publicVariable "tskobj_2"; _marker = createMarker ["NSK", position player ]; "NSK" setMarkerType "Flag"; "NSK" setMarkerSize [1, 1]; "NSK" setMarkerDir 0.93884; "YourMarker" setMarkerText "NSK's Base"; "NSK" setMarkerColor "ColorRed"; "NSK" setMarkerPos getMarkerPos "NSK"; The idea is that when I kill him it prompts me to search his body for evidence using following codes. However when I kill him it simply says objective complete. Does not create the third task. Here is the code I am using: trigger to complete task when he is killed. condition: !alive nsk; on act: "2" objStatus "DONE"; tskobj_2 setTaskState "SUCCEEDED"; player setCurrentTask tskobj_3; obj_3 = true; publicVariable "obj_3"; Then to set the third task to search his body once he is dead I use this trigger: condition: taskcompleted tskobj_2; on act: tskobj_3 = player createSimpleTask ["Search NSK's body."]; tskobj_3 setSimpleTaskDescription ["Verify NSK's death by taking his dogtags, also search for any other items of interest.","Search NSK's body.","Search NSK's body."]; task3 setSimpleTaskDestination markerpos "NSK"; player setCurrentTask tskobj_3; hint "Verify NSK's death by taking his dogtags, also search for any other items of interest." ; Like I said it used to work, can you spot anything that would cause the tskobj_3 to not be created when nsk is killed?
-
Need help with objective completions.
golfpro1286 replied to golfpro1286's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yep! That is exactly what I was thinking, and will be testing tonight, thanks again for all of your help! -
Need help with objective completions.
golfpro1286 replied to golfpro1286's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks for being so patient with me, let me give this another go... So in my init.sqf I put this: "tskobj_3" addPublicVariableEventHandler {hint "Verify Adam's death by taking his dogtags, also search for any other items of interest."}; If I am understanding this correctly then the hint should fire when "tsk_obj3" becomes active via a trigger, correct? So in my trigger I place this: Cond: !Alive Adam; On Act: "2" objStatus "DONE"; tskobj_2 setTaskState "SUCCEEDED"; player setCurrentTask tskobj_3; tskobj_3 = true; publicVariable "tskobj_3"; In my second trigger to create the task in the map menu: cond: taskcompleted tskobj_2; onact: tskobj_3 = player createSimpleTask ["Search Adam's body."]; tskobj_3 setSimpleTaskDescription ["Verify Adam's death by taking his dogtags, also search for any other items of interest.","Search Adam's body.","Search Adam's body."]; task3 setSimpleTaskDestination markerpos "Adam"; player setCurrentTask tskobj_3; hint "Verify Adam's death by taking his dogtags, also search for any other items of interest." ; Is that how it's supposed to be done? I should be able to test it tonight to find out, I will post my findings. -
Trying to make a wreck have smoke and fire but only get smoke.
golfpro1286 replied to golfpro1286's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yeah I dont have any weather on, I may try it with no add-ons but I am not too concerned about this problem nearly as much as the other that you are helping me with lol. -
Need help with objective completions.
golfpro1286 replied to golfpro1286's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hmmm do I need to make a new trigger somewhere? I thought I had it figured out lol but guess not. I did not get a chance to test it as none of my friends were available tonight. -
Need help with objective completions.
golfpro1286 replied to golfpro1286's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks for the reply, this is starting to make a lot more sense to me now. If I am understanding you correctly I should hopefully be able to modify the two triggers I already have in place. Let me know if you think this would work... Trigger to complete task 2: Cond: !aliveAdam OnAct: "2" objStatus "DONE"; tskobj_2 setTaskState "SUCCEEDED"; player setCurrentTask tskobj_3; tskobj_3 = true; publicVariable "tskobj_3"; Trigger to create task 3 with hint to all players. Cond: taskcompleted tskobj_2; OnAct: tskobj_3 = player createSimpleTask ["Search Adam's body."]; tskobj_3 setSimpleTaskDescription ["Verify Adam's death by taking his dogtags, also search for any other items of interest.","Search Adam's body.","Search Adam's body."]; task3 setSimpleTaskDestination markerpos "Adam"; player setCurrentTask tskobj_3; hint "Verify Adam's death by taking his dogtags, also search for any other items of interest." ; "tskobj_3" addPublicVariableEventHandler {hint "Verify Adam's death by taking his dogtags, also search for any other items of interest."}; I hope I have interpreted your post correctly. Thanks again for your help. -
Trying to make a wreck have smoke and fire but only get smoke.
golfpro1286 replied to golfpro1286's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I think it may be worth mentioning that I am running this mission using ACE, I didnt think that would have an effect on this script but maybe it does. I placed both in the init.sqf to get it to work and still only got smoke. -
Trying to make a wreck have smoke and fire but only get smoke.
golfpro1286 replied to golfpro1286's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Sweet man thanks, I will try this when I get back in front of my comp tonight! -
Trying to make a wreck have smoke and fire but only get smoke.
golfpro1286 replied to golfpro1286's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Can you show me what you put in the init.sqf? and just to clarify it was all in the init.sqf and nothing in the vehicle init correct? -
Need help with objective completions.
golfpro1286 replied to golfpro1286's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I have no idea how to do any of that : / think you could post an example? -
Trying to make a wreck have smoke and fire but only get smoke.
golfpro1286 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
So I want to have a C-130 wreck in my mission with a lot of smoke AND fire. So here is what I did and only got smoke, no fire... in my init.sqf i placed this: BIS_Effects_Burn=compile preprocessFileLineNumbers "\ca\Data\ParticleEffects\SCRIPTS\destruction\burn.sqf"; I then placed c-130 wreck and named it "c130" and in the init field: i=[c130,7,time,false,false] spawn BIS_Effects_Burn; any thoughts as to why I am only getting smoke? -
Need help with objective completions.
golfpro1286 replied to golfpro1286's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I ave multiple objectives, all of witch are set up through triggers. Here is an example of one of them. Cond: !aliveAdam OnAct: "2" objStatus "DONE"; tskobj_2 setTaskState "SUCCEEDED"; player setCurrentTask tskobj_3; obj_3 = true; publicVariable "obj_3"; Then I have a trigger set to the completion of task 2: Cond: taskcompleted tskobj_2; OnAct: tskobj_3 = player createSimpleTask ["Search Adam's body."]; tskobj_3 setSimpleTaskDescription ["Verify Adam's death by taking his dogtags, also search for any other items of interest.","Search Adam's body.","Search Adam's body."]; task3 setSimpleTaskDestination markerpos "Adam"; player setCurrentTask tskobj_3; hint "Verify Adam's death by taking his dogtags, also search for any other items of interest." ; Now when "Adam" is killed only the person who kills him gets to view the hint. I would like an easy yet reliable way to have all people on Blufor view the hint. I am pretty new to this. Sanders answer above mostly confused me lol.