ufopilot 5 Posted December 30, 2014 Hello there, i want to include the above mentioned "penalty" for random civilian killings. It should behave like this: provide a warning on the first offense,create a mapmarker for everyone to see on the second offense and spawn some kind of "special avenging squad" close to the person doing it. Found an example for the first two things but im kinda lost on the "spawn a special squad" part. Could anyone point me in the right direction for this? if (isServer)then{ _unit=(_this select 0); _unit addEventHandler ["killed", { _unit= (_this select 0); // UNIT THAT DIED _killer= (_this select 1); // UNIT THAT KILLED THE UNIT if (isPlayer _killer)then{ // IF KILLER IS A PLAYER _id = format ["civScriptid%1",_unit]; // UNIQUE MARKER NAME _text= format ["%1 Killed a civilian",name _killer]; // FORM MARKER TEXT _mkr = createMarker [_id,getPosASL _unit]; // CREATE MARKER _mkr setMarkerShape "ICON"; _mkr setMarkerType "hd_warning"; _mkr setMarkerText _text; _mkr setMarkerColor "colorRed"; _mkr setMarkerAlpha 0.5; _unit removeAllEventHandlers "killed"; // REMOVE EVENT HANDLER }; }]; }; many thanks for your time Share this post Link to post Share on other sites
austin_medic 104 Posted December 30, 2014 mySquad = [your-position-here-in-array-format,side-of-squad-your-spawning,config-path-to-squad] call BIS_fnc_spawnGroup; { _x setSkill random 1; } foreach mySquad; should do the job. You'll need to do a bit of work on your part to fully integrate it, but even a non-scripter should be able to figure out what i put in the parameters to send to BIS_fnc_spawnGroup to create a group of OPFOR units for you. You'll need to get another position in the script in order for the group to not unfairly spawn on top of the player. Share this post Link to post Share on other sites
ufopilot 5 Posted December 30, 2014 that points me in the direction,will try to work with your suggestions.thank you austin_medic! Share this post Link to post Share on other sites
Grumpy Old Man 3418 Posted December 30, 2014 that points me in the direction,will try to work with your suggestions.thank you austin_medic! If you wanna go fancy you could also spawn around 40 units, put them as cargo into a convoy of few trucks led by a .50cal technical and let them engage the civ killer, that's how I'd do it. Or you could let them para in, could also work wonders. Share this post Link to post Share on other sites
ufopilot 5 Posted December 30, 2014 i was thinking about paradrop around the general player area because just spawnining them 200m away of the players position lacks the "woa,why is this happening" effect Share this post Link to post Share on other sites
ufopilot 5 Posted December 31, 2014 well,i just tried the code example from my first post and it doesn`t work/do anything.No idea if thats because i use @CAF type civilians or not.Back to the drawing board... Share this post Link to post Share on other sites