Just change the 2000
in the script to whatever radius you want. That radius is the area around the intel object that insurgent installations will be revealed (temp).
Can't wait for your next iteration of Spyder addons by the way mate!
Me Too (WIP)
Just change the 2000
in the script to whatever radius you want. That radius is the area around the intel object that insurgent installations will be revealed (temp).
Can't wait for your next iteration of Spyder addons by the way mate!
Me Too (WIP)
Spyder you goddam tease...
And the percent chance of Intel? Would this be "75% percent of bodies have Intel?"
["INS_DropRate",75] ) > (random 100) )
As seen above. So 75 for 75% of dead bodies? 10 for 10% of bodies?
It would be a 75% chance
Read like: if (75 > (random number between 0-100)) then {drop that intel};
Just given this a whirl and I'm not seeing anything yet. To double check, bodies should spawn intel on death on the ground nearby, which when picked up reveals installations on the map?
@HeroesandvillainsOS And the percent chance of Intel? Would this be "75% percent of bodies have Intel?"
["INS_DropRate",75] ) > (random 100) )As seen above. So 75 for 75% of dead bodies? 10 for 10% of bodies?
Screwed up right here the missionNamespace setVariable should be the percentage you want intel to spawn
@incontinenetia Just given this a whirl and I'm not seeing anything yet. To double check, bodies should spawn intel on death on the ground nearby, which when picked up reveals installations on the map?
Yes, with @SpyderBlack723's adjustments
Okay cool, I'll have a play. Haven't found anything yet but will keep testing. Cheers again Dixon!
I've played around with it and I keep getting the following error:
'...HINT _EH",[format["Intel has been found",|#|]]] call CBA_fnc_globalEvent; }; }]; ...' Error Missing [
Try this, formatting is horrendous since I'm on mobile but it should work regardless. (Can fix later)
params ["_unit"]; _unit addEventHandler["Killed", { params["_unit","_killer"]; if ((missionNamespace getVariable ["INS_DropRate",75]) > (random 100)) then { _pos = [_unit, (random 3), (random 360)] call BIS_fnc_relPos; _intelObject = "Land_Suitcase_F" createVehicle _pos; params[["_object",objNull]]; [-1, { _this addAction ["<t color='#FF0000'>Pickup Intel</t>",{ _intel = _this select 0; deleteVehicle _intel; [getPos _intel,2000] call ALIVE_fnc_OPCOMToggleInstallations; if ((hasInterface) && !(isDedicated) && (local player) && (side player == WEST)) then { ["INS_HINT_EH",[format["Intel has been found",]]] call CBA_fnc_globalEvent; }; }]; }, _object] call CBA_fnc_globalExecute; }; }];
Same error unfortunately. It's going to be something ridiculous!
I'll look at it more tomorrow, should be an easy fix
I look forward to the fix (knowing ARMA it's probably a comma or something). I killed the entire Taliban and rid the world of terrorism but I haven't had any Intel drops yet.
params [["_unit",objNull]]; _unit addEventHandler["Killed", { params["_unit","_killer"]; private _percentage = 10; if (_percentage > (random 100)) then { _pos = [_unit, (random 3), (random 360)] call BIS_fnc_relPos; _intelObject = "Land_Suitcase_F" createVehicle _pos; [-1, { _this addAction ["<t color='#FF0000'>Pickup Intel</t>",{ _intel = _this select 0; deleteVehicle _intel; [getPos _intel,2000] call ALIVE_fnc_OPCOMToggleInstallations; if ((hasInterface) && !(isDedicated) && (local player) && (side player == WEST)) then { ["INS_HINT_EH",["Intel has been found"]] call CBA_fnc_globalEvent; }; }]; }, _intelObject] call CBA_fnc_globalExecute; }; }];
Should be fixed now. Change the '_percentage' variable to change the chance intel will spawn.
Dixon, it works perfectly! Thanks so much buddy.
Yes!!!! Ha! Nice. I look forward to putting the new script in tonight. Spyder and Dixon, thanks a million!
if ((missionNamespace getVariable ["INS_DropRate",75]) > (random 100)) then
This was from another mission I was working on and it's for a parameter forgot to remove this and change.
Have fun with these scripts :D
Cheers Dixon!
Is there any reason they wouldn't work on custom / non-vanilla factions? Like ISC_IS_O from the Iraqi Syrian Conflict mod?
I've tried editing fnc_handlekilled.sqf in the following way without success if ((faction _unit == ISC_IS_O)
.
His original line is referring to "East" so that's OPFOR, right? Is that not all inclusive for all OPFOR's regardless of mod/vanilla? Is ISC_IS_O an independent faction?
So for Leights Afghan Malitia (Independent), I was thinking I'd try this:
params[["_unit",objNull]]; if ((side _unit == INDEPENDENT) or (side _unit == RESISTANCE)) then { [_unit] call compile preprocessFileLineNumbers "fnc_intelHandler.sqf"; };
Would that not work?
No, it's OPFOR... I'll keep playing around as there could be a mod conflict.
Why wouldn't the way he has it (with "EAST") not work by default then? Sorry, I know nothing about scripting.
params[["_unit",objNull]]; if ((side _unit == EAST) or (side _unit == RESISTANCE)) then { [_unit] call compile preprocessFileLineNumbers "fnc_intelHandler.sqf"; };
And why the change to "faction_unit" from "side_unit"?
Keep me posted man. Thanks for testing.
I think it's something to do with the mods I have. It works fine on Leight's OPFOR but not so well on the Iraqi Syria Conflict Mod. Makes no sense but there we go.
I'm playing around with the script a bit to spawn different items which reveal different things, if I can get it to work, I'll post it here!
Awesome! That would be very cool! :) Keep me posted.
Do you know offhand if the way I had it for LOP_AM would be a correct way to go about it? They are technically an independant faction I've made hostile to me (BLUFOR). Should this work or do I keep it as EAST
?
params[["_unit",objNull]]; if ((side _unit == INDEPENDENT) or (side _unit == RESISTANCE)) then { [_unit] call compile preprocessFileLineNumbers "fnc_intelHandler.sqf"; };
(side _unit == RESISTANCE)) means independent will spurt out intel on death too. It's only blue dudes who won't. Delete as appropriate if you're facing a regular side and an asymmetric side in the same mission or both with give out intel on installations.
Ok. So I can leave Dixon's original stuff above then. Perfect. Thanks for the breakdown.
Makes sense.
Thank you.
If it's not working for mod units, you will need to include the cba_auto_xeh.pbo
(and .bisign) from the cba optionals folder to the cba addons folder.
Cheers Spyder, that was the issue.
You don't happen to know the functions of Alive well enough to know a way to display map intel in the style of C2ISTAR do you? I have a feeling it's a whole lot more complicated than I'm allowing for, but just on the off chance you happen to know a simple function off the top of your head.
Simple function? No
Possible? Maybe
There's a function to open a tablet, and there's a scripting command that allows you to create dialog controls on the fly. You could open the tablet then create a map control over the tablet.
Will mess with it a bit later after finishing a few things.
or you could force open the map and so you will be in the map as soon as the intel displays on the map
Ah no, sorry, I didn't explain that well. I mean, displaying intel like captured objectives, occupied objectives, all that stuff, instead of installations. Basically, doing the same thing but for regular forces too, so you can gather intel on their movements without relying on the "display map intel" setting in the C2ISTAR module. Does that make sense?
If you go to
ALiVE Menu >> Commander Actions >> Intel
A lot of this information is already available
For tracking enemy movements, it also might help to enable intel for all sides (C2ISTAR parameter) so that it sometimes shows their group movements.
Yeah, I tend to turn that off as for me, the randomness is a bit of an immersion breaker for the kind of mission I'm trying to make (spec ops working with local forces against daesh). If there was an easy way to reveal nearby profiles in the same way as the script above reveals nearby installations, that would be awesome. Searching through the Alive functions now and playing around to see if I can find one.
Revealing friendly profiles can be done via C2ISTAR
Revealing enemy profiles would have to be done with a looped ALiVE_fnc_nearProfiles check that creates a marker on each nearby profile.
@HeroesandvillainsOS Incontinenetia, sort of OT but I figured I'd ask. I see you're using a combination of Leights civs and Iraq-Syrian OPFOR, correct? I think I know the answer and perhaps you could clarify here: http://alivemod.com/forum/1603-middle-eastern-insurgents-civilians-question
Is there a reason you don't just use Leight's since you already have it enabled? I'm thinking the answer is related to Leight's having horrible configs and unit spawn numbers that don't mesh well with ALiVE. As well as the vehicle override not working properly. Is Iraq-Syrian wonderfully configured for ALiVE and I'm just not aware of it? I see it doesn't get much or any support so just wanted to pick your brain.
Answered you on the other thread buddy.
@SpyderBlack723 Revealing friendly profiles can be done via C2ISTAR
Revealing enemy profiles would have to be done with a looped ALiVE_fnc_nearProfiles check that creates a marker on each nearby profile.
Roger. Sounds a bit complex. I'll stick with the Alive_fnc_MarkUnits for now. Kinda works!
To get intel to spawn in buildings you need a design that will spawn objects on building positions efficiently with ways to enter parameters into the design so that you can control the type of environment you want, i.e. random spawns, spawn only where Alive insurgents are.
Cheers Dixon. I've actually played around with the script a bit so different items will reveal either locations of insurgents (using a script based on the Alive_fnc_MarkUnits script - couldn't work out an easier way) or installations at different radiuses.
So a mobile phone will be fairly common but wouldn't reveal many installations, a map would be rarer but reveal more, a smartphone would also be rare and reveal locations of spawned AI of a certain side, things like that. Also different intel items based on side (so no installation revealing, just AI locations). The one thing I'm struggling with is how to make the items spawn closer to the killed unit. If I change the _pos = [_unit, (random 3), (random 360)] call BIS_fnc_relPos;
to _pos = [_unit, (random 1), (random 360)] call BIS_fnc_relPos;
, it seems to make no difference. Is that the right part to change? It's a bit challenging searching for a tiny phone in a 27 square metre circle!
Also, I know ALiVE doesn't permit modifications but could somebody advise me on whether using an Alive script as a basis for creating a different function is permitted? As I mentioned, I've used parts of the Alive_fnc_MarkUnits script to reveal AI locations and it would be cool to let people have a look at this in this thread if they wanted.