Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

Blitzen88

Member
  • Content Count

    276
  • Joined

  • Last visited

  • Medals

Everything posted by Blitzen88

  1. Been looking into this for a minute now but I cant figure it out... Looking for a way to assign and re-assign support modules via a radio trigger. I've figured out how to assign support modules but, once I die and team switch to another unit, the modules are lost and my existing solution does not work. Is there a simple script/way to re-assign support modules - via a radio trigger (not a loop) once I team switch? Thanks
  2. Would that cause any sort of performance hit? I’m trying to get away from a loop to avoid any potential performance impact. That’s why I was looking for a radio trigger. thank you so much for your help! I really appreciate it!
  3. Is this firing everytime a new unit (entity) is created?
  4. The new, switchable unit, is created on death. Therefore, it cant be synced on mission start since its no in existence. My current solution is a loop solution but ai would like to use a radio trigger to remove the loop.
  5. Thanks, I will look into it. I use a “singleplayer respawn” script which essentially spawns in a switchable unit when I die. Im trying to add support to the new unit. Dont wanna rely on a loop - hence the radio trigger
  6. Trying to figure out how to craft a trigger condition which checks sectors to see if a side controls a set number. This is what I have but it doesnt seem to work:
  7. Do I need to use brackets { i stead of parenthesis ( or something else?
  8. I was trying to “fix” the Marta Module by creating and removing groupicons based off of targetknowlegde. I think Marta uses Knowsabout.
  9. Im trying to figure out how I can utilize foreach on two different arrays at the same time while filtering the results. I'm trying to apply the targetKnowledge command to all enemy and friendly units:
  10. I guess, should it go after } foreach _EnemyUnits or before } foreach _FriendlyUnits?
  11. Been looking for a script like this but Im unable to test it at the moment. Does the script create/reveal enemy markers after they have been discovered or are enemy markers always present regardless of whether or not they been discovered? Also, are enemy markers deleted after the player’s side looses track of them?
  12. Would this stuff: _KnownbyGroup = _KnowledgeArray select 0;                    _KnownbyUnit = _KnowledgeArray select 1;                    _LastSeen = _KnowledgeArray select 2; Go before or after the targetknowledge command? I dint know which bracket/scope it goes in
  13. Trying to figure out how to get an array of enemy groups which have been “spotted” by the player’s side. I can get a list of all groups by using: _Variable = allGroups select { playerside getfriend side _x <= 0.6} But I dont know how to then filter/reduce that array to groups that have been spotted by the player’s side. The knowsAbout command seems promising but it’s apparently inconsistent and it always requires units - not groups? Would Bis_fnc_enemyTargets work? The ultimate goal is to apply map markers to known enemy groups - without using Marta
  14. Would likely create a group icon on the group leader’s location if a single unit of that group has been detected. I will look into targetknowledge and targets - those commands were not on my radar
  15. I'm trying to figure out how to pass local variables via a series of addactions scripts. I know I can pass them as _arguments but I cant figure out the syntax/what I'm doing wrong. Here is the Spawn's Main Menu: Here is the Control Script which is exec'd after a selection is made on the main menu script:
  16. What is the difference between putting a variable (_object) in the arguments (_Recruit_Args) of the addaction params (_target, _caller, etc) and listing it after? For instance whats the difference between 1 & 2: Screen shot from BI Wiki?
  17. Thank you for sticking with me. This fixed the issue and the local variable carried over. I admittedly still dont fully understand the difference/correlation between the arguements defined within the {} as opposed to the []. I understand the scoping aspect of it but not the difference between the two. For instance, in the snippet above, whats the difference between variables contained within the Recruit_Args array and _object? My understanding is both of those are passed to the script…? Also, the wiki indicates they are both “arguments” for the script.
  18. Apparently I am still a moron and I still cant figure this out. Here are two test scripts that I am fooling around with. I'm trying to pass a local variable to a script.....but I've also defined global variables and cant get that to work either... Script 1: //Define Input params ["_Object"]; _Object addaction ["First Title", { params ["_target", "_caller", "_actionId", "_Recruit_Args"]; _Recruit_Args params ["_Object", "_Variable1"]; _Variable1 = "Test"; _Recruit_Args execVM "Scripts\Testing\Test2.sqf"; }, [_Object, _Variable1] ]; Script 2: //Input params ["_Object", "_Variable1"]; removeAllActions _Object; if (_Variable1 isEqualto "Test") then { Hint "Variable was carried over"; }; _Variable1 comes back as undefined. Which is weird because _object doesnt have any issues.
  19. I’ve read those links a few times, especially the addaction page. i understand that addaction passes certain variables to the script. For instance I know it passes the target, caller, and actionId. It also seems like it can pass arguments to the script and I understand those arguments can be compiled into an array (ie _params). What I struggle with is, per the addaction wiki page, what are the arguments that are given after the code section and how do those relate to the variables provided within the script section? Also, I still dont know how to pass a new local variable within the addaction script.
  20. How would I pass it to the next script? For instance, in the example _Var4 is defined as “TEST.” Would you then put _Var4 in the _pars params or after the }?
  21. How are you passing _var4 to the next script? Also, I dont understand the difference between _pars params [] and the arguments after {}.
  22. I've tried that as well as other "configurations" / syntax. I created a test script to try to simplify the process: /*========================================================================================== Arma III - Test Created by Blitzen =========================================================================================== * Blank Script to use for testing purposes * Call with: [this, "123", "456", "789"] execVM "Scripts\Testing\Test1.sqf" ===========================================================================================*/ //Define Input _Object = _this select 0; _Variable1 = _this select 1; _Variable2 = _this select 2; _Variable3 = _this select 3; //Define Additional Variable for Scoping....? _Variable4 = []; _Object addaction ["First Title", { _Variable4 = "Test"; _this execVM "Scripts\Testing\Test2.sqf" }, [_Object, _Variable1, _Variable2, _Variable3, _Variable4] ]; Here is the script that is exec'd by the first script: /*========================================================================================== Arma III - Test Created by Blitzen =========================================================================================== * Blank Script to use for testing purposes * Call with (Radio Trigger): _this execVM "Scripts\Testing\Test.sqf" ===========================================================================================*/ //Input _Object = _this select 3 select 0; _Variable1 = _this select 3 select 1; _Variable2 = _this select 3 select 2; _Variable3 = _this select 3 select 3; _Variable4 = _this select 3 select 4; removeAllActions _Object; if (_Variable4 isEqualto "Test") then { Hint "variable was carried"; }; Once the addaction is selected, there is no "variable was carried" hint.
  23. Still having difficulty figuring this out. Other examples I have seen define the arguments multiple times but the addaction wiki indicates there is a dedicated arguments section. Additionally, I've tried multiple different approaches that dont work. I've tried defining the variables within an area, defining params with my array variable, and then defining the variables again but nothing seems to work.
  24. How the process works, is you move through a variety of menus before selecting which unit/vehicle/squad to spawn For instance: Main Menu (units, Squads, Vehicles) --> "Control Type" (join player, ai controlled, etc.) --> Camo selection --> Pick which unit/vehicle/squad to spawn. The string(s) of "units", "vehicles" etc. is used by the spawn script to add spawn selections based upon input (ie addaction for a list of squads, etc.) Thats why Im trying to pass strings. Other scripts use if (_Variable isEqualto "Units") then {addaction for units}. I dont want to use global variables because I might want to have multiple spawn points/scripts.
Ă—