-
Content Count
50 -
Joined
-
Last visited
-
Medals
Everything posted by Mr Elusive
-
Disable EndMission when out of Tickets
Mr Elusive replied to greenpeacekiller's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@A. Ares Yeah of course, happy to help! I feel like we're probably just missing a step somewhere. Two questions: Where are you changing the respawn settings? Within the editor or description.ext? What respawn template are you using? Base? Instant? MenuPosition? I think #2 might be the issue as BIS_fnc_respawnTickets doesn't work properly if you're using the wrong template(s). Double-check that for me please. I'm working today, but if you're still stuck on this, I'll see if I can re-create what you're trying to do in the editor when I get home. Good luck! 😎 -
Disable EndMission when out of Tickets
Mr Elusive replied to greenpeacekiller's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey @A. Ares, Unless I'm mistaken, I think the BIS_fnc_respawnTickets function has to be executed on the server. Replace your line in initPlayerLocal.sqf with this one, let me know if it works. [player, 3] remoteExec ["BIS_fnc_respawnTickets", 2, false]; -
want script to not load until mission start screen of player looking through eyes (after mission intro map etc)
Mr Elusive replied to bendy303's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Nice. Learned something new today. -
I completely forgot that was a thing in addAction and might be easier if you don't use CBA3, or don't want to rely on it. Thanks for that. I never really knew what the difference was but I guess it does matter. I tried making that change on some other code that I wanted to use and it made it work. Why does this make a difference? I've notice "this" works for init boxes within the editor, while "_this" works for pretty much everything else. I imagine there's a technical reason for it relating to passing parameters, but I'm not a software developer or computer programmer. 🤷♂️ Perhaps someone more knowledgeable than me can answer that.
-
want script to not load until mission start screen of player looking through eyes (after mission intro map etc)
Mr Elusive replied to bendy303's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Awesome, glad you were able to get it working 😎 -
Hey @pazuzu CBA3 has a function to do this called CBA_fnc_addKeybind, although I've never tried it. You could (in theory) bind it to C, the same default keybind as the smoke launcher from the commander seat. Just make sure you have a condition that checks you're in the vehicle and maybe not in the commander seat. Hope this helps 😎
-
Hi @pazuzu You sure can! You'll need to use the BIS_fnc_fire command: For example, to force an M2A1 Slammer (variable name Tank) to fire it's smoke launcher: [Tank, "SmokeLauncher"] call BIS_fnc_fire; For modded vehicles, you'll probably need to comb through config viewer to find the "muzzle" name of the smoke launcher. You could then in theory use addAction or other commands to bind it to a key - but that's a different conversation. Hope this helps! 😎
-
Is there a way to force "Description.ext" to load?
Mr Elusive replied to hectrol's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi @hectrol The only time this happens to me is when description.ext has a typo or other syntax error. Obvious question, but have you double-checked spelling etc? -
want script to not load until mission start screen of player looking through eyes (after mission intro map etc)
Mr Elusive replied to bendy303's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey @bendy303, I've actually ran into this exact same problem for an unrelated issue. One trick I've used is to make a global trigger with this condition: time > 0 Then I'd put whatever code in the activation field. In my case, I used remoteExec and set the JIP parameter to true, which queued it up for when players loaded in. I'm not sure if it'll be relevant to your use case. How exactly are you trying to add this damage handler? Could you give us an example of your code? -
How to Modify Spawn AI Module Expression Field via Script?
Mr Elusive replied to Blitzen88's topic in ARMA 3 - MISSION EDITING & SCRIPTING
My apologies @Blitzen88 I've obviously misread your post. It was late at night when I looked at it. The contents of the expression field are saved in a variable within the module. You can give the module a variable name, then use getVariable and setVariable commands to edit. For example... // Grab the current contents of the 'expression' field: _Expression = _Module getVariable "expression"; // Update the contents of the 'expression' field: _Module setVariable ["expression", {comment "Your code here"}]; Does this help? -
How to Modify Spawn AI Module Expression Field via Script?
Mr Elusive replied to Blitzen88's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey @Blitzen88, Paste this in the expression field of the Spawn AI module: _this execVM "Script.sqf"; You can then save the input as variables using the params command: // Paste this near the top of your script file. params ["_Group", "_Module", "_GroupData"]; _Group = The group that was spawned by the module. _Module = The module where the group was spawned (I think?) _GroupData = An array of various info relating to the group. Honestly, I've only really used the _Group parameter whenever I've used Spawn AI in missions, so take the rest with a grain of salt. Hope this helps! 😎 -
Disable EndMission when out of Tickets
Mr Elusive replied to greenpeacekiller's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Haha no worries @kibaBG, you're very welcome. Happy to help! 😎 -
Disable EndMission when out of Tickets
Mr Elusive replied to greenpeacekiller's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@kibaBG - Here's a test mission with just the code I provided earlier. It definitely works. Feel free to unpack it and test in the editor for yourself. Make sure you test in MP as respawning doesn't work in SP. I've also given BLUFOR just two tickets instead of 10 to speed things up. Respawn twice and you should get the custom debrief. https://file.io/G6A3QduJ0Vxd (link is valid for 14 days) -
Disable EndMission when out of Tickets
Mr Elusive replied to greenpeacekiller's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hmm...OK let me see if I can replicate it in a test mission. Give me a few minutes. -
Disable EndMission when out of Tickets
Mr Elusive replied to greenpeacekiller's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Apologies @kibaBG I should have explained myself properly. Don't use the respawn tickets module as that will play the default ending - which you don't want. Try this instead: initServer.sqf [west, 10] call BIS_fnc_respawnTickets; After you've done that, place a default trigger anywhere on the map and check the server only box. Condition: [west] call BIS_fnc_respawnTickets <= 0 Activation: ["ZeroTickets", false] remoteExec ["BIS_fnc_endMission", 0, true] That should end the mission when BLUFOR (aka 'west') runs out of tickets. (I'm doing some after hours work, but I might be able to respond a bit later if this doesn't work.) 😎 -
Disable EndMission when out of Tickets
Mr Elusive replied to greenpeacekiller's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Oh okay. In that case, the code I posted above should work. Just change Title, Subtitle and Description text to whatever you want. // Add to Description.ext class CfgDebriefing { class ZeroTickets { title = "Mission Failed"; subtitle = "No More Reinforcements"; description = "Your team ran out of tickets."; pictureBackground = ""; picture = "b_inf"; pictureColor[] = { 0.0, 0.3, 0.6, 1 }; }; }; // Change second parameter to 'false' because it's a failed mission. ["ZeroTickets", false] remoteExec ["BIS_fnc_endMission", 0, true]; This is what you get: Three things you should be aware of if the mission is "failed" (the second parameter in BIS_fnc_endMIssion is 'false'). The title text will be in orange The title text will always be "Mission Failed", regardless of what you put in description.ext The mission failed music will play (obviously) Does this answer your query? -
Disable EndMission when out of Tickets
Mr Elusive replied to greenpeacekiller's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello again Kiba, Is the mission supposed to end or continue after showing that "you have no more reinforcements" message? Depending on what you want, there's a few approaches you can take. (Just trying to help and want to make sure I understand your question properly) -
Disable EndMission when out of Tickets
Mr Elusive replied to greenpeacekiller's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey Kiba, You can define your own win/fail screens in description.ext using cfgDebriefing. // Add to Description.ext class CfgDebriefing { class BLU_Wins { title = "Mission Completed"; subtitle = "BLUFOR Wins"; description = "BLUFOR wins the game."; pictureBackground = ""; picture = "b_inf"; pictureColor[] = { 0.0, 0.3, 0.6, 1 }; }; }; Once you've done that, create a trigger or script to globally execute BIS_fnc_endMission. For example: // Single player. ["BLU_Wins", true] call BIS_fnc_endMission; // Multiplayer. ["BLU_Wins", true] remoteExec ["BIS_fnc_endMission", 0, true]; That's pretty much all you need. I strongly recommend reading those two wiki pages as they contain a lot of information, including additional options/settings I've not listed here. If you have further questions feel free to ask, but I might not be able to answer until later in the day (working!). Cheers 😎 -
Thanks Wolle! Happy New Year to the CWR3 team and the Arma community at large. 🍻 Let's make 2024 more "fuck yeah" and less "fuck this" lol.
-
Disable EndMission when out of Tickets
Mr Elusive replied to greenpeacekiller's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I don't know if anyone is still following this thread, but I manage to figure out why the mission ends (or doesn't end in kibaBG's case). I've posted a snippet below from BIS_fnc_respawnTicketsModule. You'll notice there's a check for tickets when one side reaches zero. If you define tickets using BIS_fnc_respawnTickets like kibaBG above, the mission does not automatically end. You can then make your own trigger or condition check to go from there. //--- End the mission after tickets are exhausted if (isnil "bis_fnc_moduleRespawnTickets_end") then { bis_fnc_moduleRespawnTickets_end = [] spawn { scriptname "bis_fnc_moduleRespawnTickets: Loop"; waituntil { sleep 1; (([[west,east,resistance,civilian]] call bis_fnc_respawnTickets) select 1) == 0 }; "SideTickets" call bis_fnc_endMissionServer; }; }; TL;DR If you want the mission to end automatically, use the Respawn Tickets module in the editor. If you DON'T want the mission to end automatically, set respawn tickets in initServer.sqf using BIS_fnc_respawnTickets. Hope this helps 😎 -
Of course bro, happy to help 😎
-
That's interesting. If you've subscribed to mods, you should be able to grab their content from the !Workshop folder in your Arma 3 directory. That should be the default folder unless you've configured it differently (if that's even possible?). On my PC, for example, it's located here: C:\Games\Steam\steamapps\common\Arma 3\!Workshop Obviously you'll need to change that folder path to whatever your PC uses. Regardless, you should have sub-folders in there with all the mods you've subscribed to. Compositions and missions go somewhere else (I can't remember off top of my head), but the core mod files should be in there, .e.g. @Cold War Rearmed III. If your files really are "all over the place", this might help you locate them: Open "This PC" Type *.pbo in the search bar in the top right. Click search/tap enter. Give it some time for the search results to come up Right-click one of the found PBO files and select "Open this file location". Sorry to hear that. I haven't used that tool for some time, so it's probably out of date. There are other Steam Workshop downloaders out there, you might just have to Google them. Let us know if you still need any help, I'll be happy to help where we can.
-
Hey Yannara, I don't know if the files can be downloaded directly - have to defer to W0lle on that - but you might be able to grab them using a Steam Workshop downloader tool. https://github.com/NeutronX-dev/WorkshopDownloader/ Alternatively, you might be able to subscribe to the mods on another PC and then just copy the folders over. I don't know if that trick still works, but might be worth a shot. Good luck!
-
How are SpawnAI Unit costs calculated?
Mr Elusive replied to Mr Elusive's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey CollectiveS, I didn't get a notification so I totally missed your response - sorry about that! Thank you so much for sharing your findings, this is really useful stuff. -
How are SpawnAI Unit costs calculated?
Mr Elusive posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey BIS Forums, Can anyone explain how SpawnAI unit costs are actually calculated? I'm working on a mission using the SpawnAI modules. The SpawnAI modules have a manpower cap of 50 by default and I'd like to tweak it to spawn more/less units of different types (infantry, armor etc). According to the MP Support Guidelines on the BIS Wiki... a rifleman costs about 0.5 an AA/AT soldier about 6 a MRAP about 6 an APC about 12 a tank about 27 The page says the values are calculated using the cost and threat values defined in the unit's config. I admit I'm not great at math, but I just don't see how they came up with 0.5 as an answer using those two values. Example 1 - a standard NATO rifleman ("B_Soldier_F") and open up his entry in the config viewer: cost = 100000; threat[] = {0.8,0.1,0.1}; Example 2 - NATO AT Missile Specialist ("B_soldier_AT_F"): cost = 130000; threat[] = {0.8,0.8,0.3}; According to the guidelines these units should cost 0.5 and 6 respectively. Clearly I'm missing something, so can anyone tell me how unit costs are actually calculated? Thanks in advance.