heldenhammer 10 Posted July 28, 2014 Hi folks, after nearly ten years of abstinence I decided to install OPF GOTY Edition once again just because I have some free time, I still own an old desktop pc from 2005 which is still running and I loved the freedom of coice you had during game play of that brilliant military simulation. And of course like in former times I became totally addicted to that game. :cool: For the moment I would like to create my own campaign and just started with editing my first mission and faced already some minor problems. The main idea of my mission is that the player starts as a squad leader of an infantry squad and the aim is that before getting into combat against TONAL rebels the player has to prove his leading skills on the shooting range. Therefore I created some empty objects of trucks and some targets found under empty/objects. While it is a pain to force my maschine gunners to attack the empty trucks, after several orders like target truck 12 o'clock, Nr 3 (maschine gunner) engage/fire they conduct the orders but I can not order my other soldiers to engage/fire those other targets. By testing the mission I ordered them to attack the target (I used the command vision and ordered them to attack building(which seems to be the target) and received the confirmation followed by a negative reply. I don't know why it is not working that way because I can destinate those target objects as targets so why is the AI preventing from shooting at them. Any idea how to fix that issue. Every help, advice is highly appreciated. Please do not blame me for my bad english, but I am not a mothertongued speaker therefore I beg your pardon for maybe using confusing expressions:butbut:. Greetings from Germany heldenhammer Share this post Link to post Share on other sites
-rageQuit- 10 Posted July 28, 2014 Soldiers will only engage targets that their weapons are capable of damaging - they consider trucks to have too much armour for their AKs / M4s. Assault rifles are anti-personnel only. Depending on the addon/mod, machineguns might take on light helicopters or soft vehicles. If your intention is to make the player practice designating targets and using the radio menu, then I'm afraid I don't see a simple solution. (For cinematic purposes, you could have them shoot at a point in space with the command doTarget [x,y,z] followed by doFire <weapon>, but that all takes some scripting). PS. Then again, the player might learn what his soldiers will or won't shoot at, but that's probably a vain hope in this day and age ;) Share this post Link to post Share on other sites
heldenhammer 10 Posted July 28, 2014 Soldiers will only engage targets that their weapons are capable of damaging - they consider trucks to have too much armour for their AKs / M4s.Assault rifles are anti-personnel only. Depending on the addon/mod, machineguns might take on light helicopters or soft vehicles. If your intention is to make the player practice designating targets and using the radio menu, then I'm afraid I don't see a First thanks for your answer. :( That was the big idea while I was asking. So I need targets for my assault rifles. Any proposal? Share this post Link to post Share on other sites
AlexeiGuba 12 Posted July 28, 2014 You could work with Lester's good old invisible targets: http://www.ofpec.com/addons_depot/index.php?action=details&id=36 When I remember right, they are objects you place in the editor and the AI then accepts them as valid targets, no matter what is behind that invisible target. Share this post Link to post Share on other sites
heldenhammer 10 Posted July 28, 2014 Thanks AlexeiGuba, seems I see some light at the end of my tunnel. Will check it out later during the day, today I am a little bit too tired ;-) Share this post Link to post Share on other sites
Frenzi_ 18 Posted July 29, 2014 (edited) fyi, both the original Tonal mod and Tonal Redux has its own set of invisible targets under Empty -> Bas Isle - Misc -> Target ... So if you do plan to utilize invisible targets, then you most likely won't need the extra addon that AlexeiGuba suggested. ps: Looking forward to your campaign ;) Edited July 29, 2014 by Ferenczi Share this post Link to post Share on other sites
heldenhammer 10 Posted July 29, 2014 fyi, both the original Tonal mod and Tonal Redux has its own set of invisible targets under Empty -> Bas Isle - Misc -> Target ...So if you do plan to utilize invisible targets, then you most likely won't need the extra addon that AlexeiGuba suggested. Hi Ferenczi, even better news. Will check this out. Anyhow, to the moderators of that thread, is it feasible to not to close this thread even if it seems that this particular issue is solved. Anyhow, I guess I will need some space to ask questions and advices from the community during the progress of my campaign editing. Cheers heldenhammer Share this post Link to post Share on other sites
heldenhammer 10 Posted July 30, 2014 So thanks to BAS invisible targets th soldiers of my squad open directly fire on them, combined with those normal targets I could achieve that after some hits, the targets are falling down like foressen. Anyhow, if I do not order my squad to cease fire they continue engaging those targets until they run out of ammo. Very unpleasened situation. Is there a chance that those invisible targets can be destroyed. Best way of course synchronuzed with the falling down of those visible targets. Thanks in advance, every advice hihly appreciated. Cheers heldenhammer Share this post Link to post Share on other sites
Frenzi_ 18 Posted July 30, 2014 (edited) For example: You have a truck as the actual target and an invisible target right in front of it named invTarget_1 Then you just write this addEventHandler ["Killed", "deleteVehicle invTarget_1"] in the truck's initialization field. Repeat the process for any additional targets. Edited July 30, 2014 by Ferenczi Share this post Link to post Share on other sites
heldenhammer 10 Posted July 30, 2014 Sounds to easy to be true. Will check it out later during that evening. Anyhow, great thank you for your quick reply. Share this post Link to post Share on other sites
heldenhammer 10 Posted July 30, 2014 (edited) Jihhea, it is working, thanks a lot. ;) Cheers heldenhammer Edited July 31, 2014 by heldenhammer Share this post Link to post Share on other sites
heldenhammer 10 Posted July 31, 2014 Hi folks, once again me. My shooting range is now working like planned. Anyhow, I am not absolutely happy with the result, to make it really perfect I would highly appreciate to limit the available time for the player to conduct the shooting exercise with his squad. And to make things even more complicated, I would love to rate his time effectiveness e.g. more than 30 minutes => mission failed (0 points) more than 20 but less 30 minutes => something like ok, accomplished (100 points for the statistic) less than 20 minutes => something like (200 points for the static points at the end of the mission). Any proposals how to edit this? Thanks in advance heldenhammer Share this post Link to post Share on other sites
-rageQuit- 10 Posted July 31, 2014 (edited) Since you are making a campaign, you can make more than one path for the player to take. In the root of your campaign folder there should be description.ext, one function of which is to plot a course between missions. Campaign missions can end in 7 ways (6 normal plus lose/fail) - each of those endings could proceed onto a different mission (it is usual to have lose/fail make the player repeat the mission). Yours could look something like this: class 01_TargetRange: MissionDefault { end1 = 02_TrueStartCampaign; <--- completed successfully, proceed to campaign proper end2 = 01b_Remedial; <--- not too bad, try something else to prove self lost = 01_TargetRange; <--- fail, start over again template = 01_TargetRange.noe; }; class 01b_Remedial: MissionDefault { end1 = 02_TrueStartCampaign; <--- completed successfully, proceed to campaign proper lost = 01_TargetRange; <--- fail again, go back to start template = 01b_Remedial.noe; }; class 02_TrueStartCampaign: MissionDefault { end1 = ...; lost = 02_TrueStartCampaign; template = 02_TrueStartCampaign; }; NB. There is probably a better way than the above if you really want to punish a player. In the mission folder, there is again description.ext, this time it should include the lines: minScore=1000 avgScore=5000 maxScore=10000 These are the scores that the player needs to earn his pips/stars in the debriefing. He typically gets 200 - 500 for killing enemy infantry. You can increase a player's score with addRating. To check how long since a mission started, use time. In the mission editor, place triggers that are endings of the appropriate Type. Make their conditions a variable name eg. EndOne for End1, EndTwo for End2, MissFailed, and so on. When the player reaches the finishing line, launch a script: [] exec "CheckScore.sqs" in the OnActivation box. //CheckScore.sqs if (time < 1200) then {player addRating 5000; EndOne = true; exit} if (time < 1800) then {player addRating 2500; EndTwo = true; exit} // if neither of the above are true, then the player has failed player addRating -1000 MissFailed = true exit Oh, and since its a campaign you can create cinematics for the OutroLoose part of the mission, which the player should see if he fails. Edited July 31, 2014 by -rageQuit- Forgot to mention OutroLoose Share this post Link to post Share on other sites
heldenhammer 10 Posted July 31, 2014 Short answer because it is nearly 01.30 in the morning, at least in Germany. @ rageQUite thanks for your fast help, sounds great, will continue to work on the starting mission of my campaign experimenting with the script proposals provided by you. Hope you do not mind if i turn to you in case of further questions related to the targetrange. heldenhammer Share this post Link to post Share on other sites