Jump to content

C.Hall

Member
  • Content Count

    14
  • Joined

  • Last visited

  • Medals

Community Reputation

3 Neutral

About C.Hall

  • Rank
    Private First Class

Recent Profile Visitors

223 profile views
  1. Hello Vandeanson, Can you tell how how this is done? I have adjusted the loot spawns to 100% but no loot is spawning. Is there something else needed to activate it? Do I need to place the ravage loot module? Any assistance is appreciated.
  2. You have assumed all correctly and thank you for your fast response. Thank you for the solution, and keep up the great work!
  3. Hello, Thank you for the awesome work, this is exactly what I was looking for! I have scanned all 10 pages of this thread, but have not found an answer. Forgive me if I missed it. How do I reset the stats? I have racked up lots in testing the mission, but want to start fresh now. Please help! Thanks.
  4. Thank you, I thought I had read everything, but apparently, I missed the "marker setup" section. Derp LOL
  5. Yes, it makes the markers invisible until the player is in the zone, then it lights up.
  6. I have searched a long time in this thread but have not found the answer. How can I make the markers invisible? (Not green or red)
  7. EDIT: I GOT IT!!! The sound file was missing the "a" at the end. Can you believe it? A fricking week of research and that is what it was. LOL Thanks again. The code below works! So grateful for the response. I have everything working perfectly now except for the sound. I've spent over a week trying to figure it out from this thread, reading other threads, and, well nothing. I tried to implement TankBusters code, and the error went away but the sound still does not play. I have a folder named "sound" in the mission folder (where init.sqf lives) with the sound file inside of the folder and my SSSB.sqf is this: /* SSSB - Sarogahtyps Simple Suicide Bomber Description: Function can be called wherever u want even in init line. It waits for player who is in range and follows him until reached and then BOOOOM! The bomber is walking if player can see the bomber. If there is no line of sight to player then the bomber will run. Works even if the bomber is driving a vehicle. If player is out of range before bomber can reach him then the bomber will just wait for the next player in range. You can pass a chance to get a bomber to the function. This is useful for implementing the script into COS - Civilian Occupation System. You can apply the script to all civilians and if u pass e.g. 1 % as chance then only every 100th civ will become a bomber and wait for near players. Enjoy the boom. :-) Cheers Saro. Paramameters: object - the object of your unit which should become a bomber number (optional) - range to seek for players (default is 300 m) number (optional) - chance to turn the unit into a bomber. (default is 100 %) Return values: number - handle of spawned script if someone likes to check if bombers script has ended (scriptDone) will return -1 if script ends without spawning code (in case no civ was turned into bomber) */ mission_root = str missionConfigFile; mission_root = [mission_root, 0, -15] call BIS_fnc_trimString; params [["_civ", objNull,[objNull]], ["_act_range", 300, [0]], ["_chance", 100, [0]]]; if ((random 100 > _chance) || !(alive _civ)) exitWith {-1}; _handle = [_civ, _act_range] spawn { params ["_bomber", "_act_range"]; private _melee_dist = 15; private _boom_dist = 5; private _dist_target = _act_range; private _lost_range = round (_act_range * 1.2); private _act_range_sqr = _act_range ^ 2; private _melee_dist_sqr = _melee_dist ^ 2; private _boom_dist_sqr = _boom_dist ^ 2; private _dist_target_sqr = _act_range ^ 2; private _lost_range_sqr = _lost_range ^ 2; private _grp_bomber = group _bomber; private _is_vec = if (isNull objectParent _bomber) then {false} else {true}; private _target_players = []; private _wp =[]; while {(alive _bomber) && (_dist_target_sqr > _boom_dist_sqr)} do { // wait until players are in range waitUntil { sleep (2 + random 1); _target_players = (allPlayers - entities "HeadlessClient_F") select {(alive _x) && ((_x distanceSqr _bomber) < _act_range_sqr)}; ((count _target_players > 0) || !(alive _bomber)) }; // end everything if suicide bomber is already dead if !(alive _bomber) exitWith {}; // follow nearest player as long as bomber lives, target is in range and target is not close enough to boom while {alive _bomber && (_dist_target_sqr < _lost_range_sqr) && (_dist_target_sqr > _boom_dist_sqr)} do { _target_players = (allPlayers - entities "HeadlessClient_F") select {(alive _x) && ((_x distanceSqr _bomber) < _act_range_sqr)}; // get nearest player _target_players = _target_players apply {[(_x distanceSqr _bomber), _x]}; _target_players sort true; _target_plyr = _target_players select 0 select 1; // check distance and visibility _dist_target_sqr = if(count _target_players > 0) then {_target_players select 0 select 0} else {_lost_range_sqr}; _can_see = [_target_plyr, "VIEW", _bomber] checkVisibility [(eyePos _target_plyr), (eyePos _bomber)]; // add waypoint and set bombers behavior if (count _wp > 0) then {_grp_bomber setCurrentWaypoint _wp;} else {_wp = _grp_bomber addWaypoint [position _target_plyr, 0];}; _wp setWaypointPosition [position _target_plyr, 0]; _wp setWaypointBehaviour "CARELESS"; _wp setWaypointCombatMode "BLUE"; _wp setWaypointCompletionRadius 0; _grp_bomber setBehaviour "CARELESS"; _grp_bomber setCombatMode "BLUE"; //run if close enough or if target cant see bomber if ( (_can_see < 0.3) || ((_dist_target_sqr < _melee_dist_sqr) && !_is_vec) || ((_dist_target_sqr < (2 * _melee_dist_sqr)) && _is_vec) ) then { _wp setWaypointSpeed "FULL"; } else { _wp setWaypointSpeed "LIMITED"; }; sleep (0.5 + random 0.5); }; // end follow while _wp = []; }; // main while end _playsound = mission_root + "sound\alluha.ogg"; playsound3d [_playsound, _bomber,false, getposasl _bomber,10,1,50]; sleep 1.7; if (_is_vec) then { _boom = createVehicle ["Bo_GBU12_LGB", getPos _bomber, [], 0, "CAN_COLLIDE"]; } else { _boom = createVehicle ["R_80mm_HE", getPos _bomber, [], 0, "CAN_COLLIDE"]; }; deleteVehicle _bomber; }; //spawn end \\\\ true Any assistance in getting the sound to play would be greatly appreciated.
  8. Hello, and thank you for the script. I am having an issue with testing this. As soon as one of my team is injured or incapacitated by enemy AI, I lose leadership of the team. Thoughts? Also, as the player, when I get shot, I do not become disabled, I just die.
  9. Hello Saro, Here is what I have (with the delete bomb if bomber dies line included) /* SSSB - Sarogahtyps Simple Suicide Bomber Description: Function can be called wherever u want even in init line. It waits for player who is in range and follows him until reached and then BOOOOM! The bomber is walking if player can see the bomber. If there is no line of sight to player then the bomber will run. Works even if the bomber is driving a vehicle. If player is out of range before bomber can reach him then the bomber will just wait for the next player in range. You can pass a chance to get a bomber to the function. This is useful for implementing the script into COS - Civilian Occupation System. You can apply the script to all civilians and if u pass e.g. 1 % as chance then only every 100th civ will become a bomber and wait for near players. Enjoy the boom. :-) Cheers Saro. Paramameters: object - the object of your unit which should become a bomber number (optional) - range to seek for players (default is 300 m) number (optional) - chance to turn the unit into a bomber. (default is 100 %) Return values: true if script has ended. */ params [["_civ", objNull,[objNull]], ["_act_range", 300, [0]], ["_chance", 100, [0]]]; if ((random 100 > _chance) || !(alive _civ)) exitWith {true}; [_civ, _act_range] spawn { params ["_bomber", "_act_range"]; private _melee_dist = 15; private _boom_dist = 5; private _target_players = []; private _grp_bomber = group _bomber; private _wp =[]; private _dist_target = _act_range; private _lost_range = round (_act_range * 1.2); private _is_vec = if (isNull objectParent _bomber) then {false} else {true}; while {(alive _bomber) && !(isNull _bomber) && (_dist_target > _boom_dist)} do { // wait until players are in range waitUntil { sleep (2 + random 1); _target_players = (allPlayers - entities "HeadlessClient_F") select {(alive _x) && ((_x distance _bomber) < _act_range)}; ((count _target_players > 0) || !(alive _bomber)) }; // end everything if suicide bomber is already dead if !(alive _bomber) exitWith {}; // follow nearest player as long as bomber lives, target is in range and target is not close enough to boom while {alive _bomber && (_dist_target < _lost_range) && (_dist_target > _boom_dist)} do { _target_players = (allPlayers - entities "HeadlessClient_F") select {(alive _x) && ((_x distance _bomber) < _act_range)}; // get nearest player _target_players = _target_players apply {[(_x distance _bomber), _x]}; _target_players sort true; _target_plyr = _target_players select 0 select 1; // check distance and visibility _dist_target = _target_players select 0 select 0; _can_see = [_target_plyr, "VIEW", _bomber] checkVisibility [(eyePos _target_plyr), (eyePos _bomber)]; // add waypoint and set bombers behavior if (count _wp > 0) then {_grp_bomber setCurrentWaypoint _wp;} else {_wp = _grp_bomber addWaypoint [position _target_plyr, 0];}; _wp setWaypointPosition [position _target_plyr, 0]; _wp setWaypointBehaviour "CARELESS"; _wp setWaypointCombatMode "BLUE"; _wp setWaypointCompletionRadius 0; _grp_bomber setBehaviour "CARELESS"; _grp_bomber setCombatMode "BLUE"; //run if close enough or if target cant see bomber if ( (_can_see < 0.3) || ((_dist_target < _melee_dist) && !_is_vec) || ((_dist_target < (2 * _melee_dist)) && _is_vec) ) then { _wp setWaypointSpeed "FULL"; } else { _wp setWaypointSpeed "LIMITED"; }; sleep (0.5 + random 0.5); }; // end follow while _wp = []; }; // main while end //Delete Bomb if Bomber dies if(!alive _bomber) exitWith {deleteVehicle _bomber;}; if (_is_vec) then { _boom = createVehicle ["Bo_GBU12_LGB", getPos _bomber, [], 0, "CAN_COLLIDE"]; } else { _boom = createVehicle ["R_60mm_HE", getPos _bomber, [], 0, "CAN_COLLIDE"]; }; deleteVehicle _bomber; }; //spawn end true And the init line d = [this, 250, 50] execVM "SSSB.sqf"; Thanks
  10. Is it possible to deactivate the explosive when the bomber is killed? As it stands, when I shoot the bomber, he explodes.
  11. I am having bombers blow themselves up when they are nowhere near a player. Just beforehand, this error pops up: while {alive _bomber && (_dist_target < _lost_range) && (_dist_ta> 21:08:37 Error position: <_dist_target < _lost_range) && (_dist_ta> 21:08:37 Error Undefined variable in expression: _dist_target 21:08:37 File C:\Users\Chris\Documents\Arma 3 - Other Profiles\C%2eHall\missions\R34P3RS_FRAMEWORK.Zargabad\SSSB.sqf, line 71 21:08:37 Error in expression <lse {true};
  12. Thank you for the response, I got it working. Now trying to get the sound to play. Same as others, I am getting an error and no sound. I replaced "YOURSOUNDNAME" with the name of the sound file "allahu.ogg" which is in my mission folder, but I am guessing that is not how you do it. if ( !_shouted && (((_dist_target < _melee_dist) && !_is_vec) || ((_dist_target < (2 * _melee_dist)) && _is_vec)) ) then { _shouted = true; [_civ, ["YOURSOUNDNAME", 150]] remoteExec ["say3D", -2]; // << ADJUST SOUNDNAME HERE !! }; How does one define mission_root? I am sorry, I am not a coder, but I really want to make this work. Thanks.
  13. Hello, and thank you for the script. I have followed the instructions to the letter, but the civ I put the code into the init line for just stands there, and when player walks up to him, nothing happens. Not sure what I am doing wrong.
×