Jump to content

Theo Thalwitzer

Member
  • Content Count

    19
  • Joined

  • Last visited

  • Medals

Community Reputation

4 Neutral

About Theo Thalwitzer

  • Rank
    Private First Class

Profile Information

  • Gender
    Male
  • Location
    Namibia

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Well, apparently one has to firstly create/edit the mission's Description.ext file, adding the following line: #include "\a3\Missions_F_Oldman\Systems\commonDescription.inc" I have no idea why this works (yet) but it does. Then place an <Old Man Init> module anywhere and adjust the settings as preferred. All other modules are dependent on the <Old Man Init> module to work. I'd recommend this: https://steamcommunity.com/sharedfiles/filedetails/?id=2074224580
  2. Theo Thalwitzer

    ARMAHOLIC website not working

    I have a suspicion this site has been hacked by none other than STEAM itself. moddb.com is also offline. Steam is getting on my last nerves...
  3. Theo Thalwitzer

    Side marker visibility

    That works nice but it seems a lot of code for a simple task. This might also work: - Place your (empty) markers where you want them to be in the editor. - Change their color and text to what you would like them to be inside the marker edit-boxes. Now put the following into your script or trigger: if (side player==WEST) then { myMarkers=["mkrExt1","mkrExt2","mkrExt3"]; {_x setMarkerTypeLocal "hd_pickup";} forEach myMarkers; }; This does exactly the same as above but with only 2 lines of code... Line 1 creates an array called myMarkers from your placed markers. Line 2 simply changes the type. Hope that helps
  4. Theo Thalwitzer

    Spawn unit at random marker and create task

    Thanks to everyone who helped with this! It is now thoroughly solved. Special thanks to wogz187 - your solution is exactly what I needed without adapting more than one line of code as simplicity and less lines of code is what I'm after. It's great to have a community as selflessly helpful as this!
  5. Theo Thalwitzer

    Spawn unit at random marker and create task

    BINGO! Thanks a bunch! And it's right there on the wiki... What a tool I am... This is working flawlessly now. And suddenly I see a load of possibilities! Just one question though: What does the "FORM" represent?
  6. Theo Thalwitzer

    Unit recruitment and dismissal

    Super! I'll give it a go!
  7. Theo Thalwitzer

    Unit recruitment and dismissal

    Awesome thanks! I have Bon's so I'll go through it. My only problem is that I have no programming background, so I have to learn this on the fly. Bon's scripts is a little advanced for my current understanding but I'm getting there... Currently I regularly use a mod called Spyder Addons for recruitment and vehicle spawning but it doesn't allow me to dismiss team members, which is why I came up with this.
  8. This is just a little script-set I made to recruit and dismiss units at will. So far it works fine in SP (Surprisingly well, actually) but I want to make this MP compatible. The set consists of 4 small script files: 1. File: "recruiting.sqf" // Code below: /* Usage: put this in INIT of unit to be recruited; nul=[this] execVM "TRecruit\Recruiting.sqf"; // 'this' or unitname */ _guyNotRecruited = true; _fng = _this select 0; _fng setcaptive true; //use different state or condition perhaps?? _recruitGuy = _fng addAction ["Recruit","TRecruit\newguyinit.sqf"]; while {_guyNotRecruited} do { if (not(captive _fng)) then {_guyNotRecruited = false}; if (not alive _fng) exitwith {_fng removeAction _recruitGuy}; sleep 1; }; _fng removeAction _recruitGuy; [_fng] join (group player); _fng enableAI "MOVE"; sleep 1; nul = [[["New Team Member recruited.","<t align='center' shadow='2' size='0.7'>%1</t><br/>"],["","<t align='center' shadow='2' size='0.7'>%1</t><br/>"],["","<t align='center' shadow='2' size='0.7'>%1</t>"]]] spawn BIS_fnc_typeText; sleep 5; nul=[_fng] execVM "TRecruit\dismissing.sqf"; 2. File: "dismissing.sqf" //Code below: _guyRecruited = true; _fng = _this select 0; _dropGuy = _fng addAction ["Dismiss","TRecruit\dropguyinit.sqf"]; while {_guyRecruited} do { if (captive _fng) then {_guyRecruited = false}; if (not alive _fng) exitwith {_fng removeAction _dropGuy}; sleep 1; }; _fng removeAction _dropGuy; [_fng] join grpNull; _fng setCaptive true; sleep 1; if (not alive _fng) then { hint "Team member deceased"; } else { nul = [[["Team Member dismissed.","<t align='center' shadow='2' size='0.7'>%1</t><br/>"],["","<t align='center' shadow='2' size='0.7'>%1</t><br/>"],["","<t align='center' shadow='2' size='0.7'>%1</t>"]]] spawn BIS_fnc_typeText; nul=[_fng] execVM "TRecruit\recruiting.sqf"; }; sleep 5; 3. File: "newGuyInit.sqf" //Code below: // set unit not captive _unit=_this select 0; _unit setcaptive false; 4. File: "dropGuyInit.sqf" //Code below: // set unit not captive _unit=_this select 0; _unit setcaptive true; //// I hope someone will find this useful, but as I said it will have issues in MP. Works great in SP though.
  9. Theo Thalwitzer

    Spawn unit at random marker and create task

    I also have another problem which has been stumping me for a while. Its a simple syntax issue I think: While this line works fine: _taskArray = ["red_1","red_2","red_3","red_4","red_5","red_6","red_7","red_8","red_9","red_10","red_11","red_12","red_13","red_14","red_15"]; I know its also possible to shorten that 15-name list by using; "red_%1" , which would then select all markers starting with "red_". I tried: _taskArray = ["red_%1"]; but I know its not correct and I also know it should be pretty simple. I'm still learning ...
  10. Theo Thalwitzer

    Spawn unit at random marker and create task

    I'm taking a guess here but I suspect the "undefined variable"-error may be eliminate by giving the spawned unit a new name perhaps? As I mentioned, as long as the officer is named the script works fine via the unit's name. I know its possible to name a spawned unit with setVehicleVarName. I have made another script: (Where 'tareaGrn' is a placed helipad. The full script looks like this: //Start of script if (!alive tareaGrn) then { hint "The distribution point has been destroyed"; } else { _defenceGrpG = createGroup Independent; testGroupB = _defenceGrpG; //hint "Spawning New Assault Team..."; _newSoldier1 = "PMC_SecurityCon_MXGL" createUnit [position tareaGrn,testGroupB]; sleep 1; _newSoldier2 = "PMC_FieldSpecialist_M249" createUnit [position tareaGrn,testGroupB]; sleep 1; _newSoldier3 = "PMC_Marksman_M14" createUnit [position tareaGrn,testGroupB]; sleep 1; _newSoldier4 = "PMC_SecurityCon_MX" createUnit [position tareaGrn,testGroupB]; sleep 1; _newSoldier5 = "PMC_Medic" createUnit [position tareaGrn,testGroupB]; sleep 1; _newSoldier6 = "PMC_TL_M4" createUnit [position tareaGrn,testGroupB]; sleep 1; _newSoldier7 = "PMC_Engineer" createUnit [position tareaGrn,testGroupB]; sleep 2; _newSoldier8 = "PMC_SecurityCon_MX" createUnit [position tareaGrn,testGroupB]; sleep 1; // hint "TeamSpawn Complete!"; testGroupB = group pmcl; }; sleep 2; _newSoldier1 setVehicleVarName "pmc1"; _newSoldier2 setVehicleVarName "pmc2"; _newSoldier3 setVehicleVarName "pmc3"; _newSoldier4 setVehicleVarName "pmc4"; _newSoldier5 setVehicleVarName "pmc5"; _newSoldier6 setVehicleVarName "pmc6"; _newSoldier7 setVehicleVarName "pmc7"; _newSoldier8 setVehicleVarName "pmc8"; hint "Renamed them"; testGroupB setBehaviour "SAFE"; nul=[] execVM "randomMoveS3.sqf"; //Activates waypoint task on units //End of script As you can see I kept this as simple as possible and yes it works fine - so I'm guessing adding: _hvt setVehicleVarName "hvt_1"; This should rename the variable <_hvt> to <hvt_1> , which seems easier to define when the unit gets killed and completes the task. Not sure if it will work in MP though
  11. Theo Thalwitzer

    Spawn unit at random marker and create task

    Wow! This is a lot to understand but I'll work though it. Thanks I tried this and it works nicely with one error: Undefined variable in expression _unit. Also the task doesn't end when the officer gets killed... Sorry I'm a little lost here.
  12. Theo Thalwitzer

    Spawn unit at random marker and create task

    That is correct, they are markers. But I still get an error saying: Error Undefined variable in expression: _hvt This suggests that the variable name "_hvt" has not been assigned to the unit? Like I said I'm only slightly literate in .sqf coding and have much to learn
  13. Hi I sure help someone can shed some light - I'm making a mission where I want several random tasks to be created at random marker positions. With this I have found a way which thus far proved very effective. I created 15 markers which I placed in appropriate positions for each task. Then an officer-unit, named S1, which I placed out of the way (simulation and damage disabled) until the script is called. The working script looks like this: // SCRIPT CODE // //Place officer (s1) at random marker ("red1"-"5") and start him patrol the area. Only markers and unit placed out of the way. Once the unit (s1) has been placed, another script (USPS.sqf) then gives the unit random waypoints to patrol. After that, another script (PWNR) spawns in a support group, also patrolling the area. Task complete when s1 is killed. _taskArray = ["red_1","red_2","red_3","red_4","red_5","red_6","red_7","red_8","red_9","red_10","red_11","red_12","red_13","red_14","red_15"]; //array with marker names _taskPos = _taskArray call BIS_fnc_SelectRandom; //select a random spawn position _officer1 = s1; s1 setPosATL getMarkerPos _taskPos, 100; [player,"Task_1",["A CSAT officer is around this area","Assassinate the officer","Kill"],_officer1,True] call BIS_fnc_taskCreate; sleep 0.5; s1 hideObject false; s1 allowDamage true; s1 setCaptive false; null = [s1, 100, 200, _taskPos, _taskPos, 200, true, "SAFE", "RED", "LIMITED", "FILE", 30, 30, 0, [true,35,25,3,1]] execVM "scripts\USPS.sqf"; sleep 0.5; nul = [_taskPos,200,"EAST GUERILLA INFANTRY UNITS",8] execVM "PWNR\Scripts\PUGS.sqf"; while {alive s1} do { waitUntil {not alive s1}; ["Task_1","Succeeded"] call BIS_fnc_taskSetState; }; As I said, this works fine as long as the unit (S1) and markers is placed in the editor. My objective: I want to create the same task WITHOUT placing the unit in the editor, but rather spawning him in with <createUnit>. In this regard I have made the following script: // Task: Kill HVT _hvtArray = ["hvt_1","hvt_2","hvt_3","hvt_4","hvt_5"];//Set location array _hvtPos = _hvtArray call BIS_fnc_SelectRandom; //Select random position from array _hvtGroup = createGroup EAST; // Create HVT group _hvt = "O_Officer_F" createUnit [position _hvtPos, _hvtGroup]; // Spawn HVT [player,"Eliminate_HVT",["We have pinpointed the position of a High Value Target in the indicated area. You are to relocate and eliminate the HVT.","High Value Target","Kill"],_hvt,True] call BIS_fnc_taskCreate; while {not isNull _hvt} do { waitUntil {not alive _hvt}; ["Eliminate_HVT","Succeeded"] call BIS_fnc_taskSetState; }; //The script exits with the following error refering, I think, to line 4 : <_hvt = "O_Officer_F" createUnit [position _hvtPos, _hvtGroup]; > and neither the unit is spawned, or the task is created. "Error position, Type String, Expected object, position" I have very little scripting experience but I'm learning fast. What am I doing wrong here?
  14. I found this topic on a search and would like to know where and how to use the line. In the editor? The config viewer? A trigger? I have no idea how to apply that
  15. Theo Thalwitzer

    User Mission Request Thread

    Variable should immediately seek single player campaigns and dismount his high horse. If a long-span mission offers no respawn, what's the point? Really? If some 15 y/o Rambo team-killls me in a moment of pimple-madness, I'm to accept fate? And you talk about reality... mmmm....
×