Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- span class="re5"> GeneratePos = {
- _center = [7100, 7750, 0];
- _mapRadii = 6250;
- _pos = [_center,0,_mapRadii,20,0,20,0] call BIS_fnc_findSafePos;
- _pos
- };
- Make_Em_Spin = {
- private ["_group","_position","_xpos","_ypos","_quad1","_quad2","_quad3","_quad4","_wp1","_wp2","_wp3","_wp4","_center","_radius"];
- _group = _this select 0;
- _position = _this select 1;
- _xpos = _position select 0;
- _ypos = _position select 1;
- _radius = 50;
- _quad1 = [_xpos, _ypos+20, 0];
- _quad2 = [_xpos+20, _ypos, 0];
- _quad3 = [_xpos, _ypos-20, 0];
- _quad4 = [_xpos-20, _ypos, 0];
- _wp1 = _group addWaypoint [_quad1, _radius];
- _wp1 setWaypointType "MOVE";
- _wp2 = _group addWaypoint [_quad2, _radius];
- _wp2 setWaypointType "MOVE";
- _wp3 = _group addWaypoint [_quad3, _radius];
- _wp3 setWaypointType "MOVE";
- _wp4 = _group addWaypoint [_quad4, _radius];
- _wp4 setWaypointType "MOVE";
- _center = _group addWaypoint [[_xpos,_ypos, 0], _radius];
- _center setWaypointType "CYCLE";
- };
- Spawn_Rabbits = {
- private ["_this","_rabbitcount","_group","_rabbit"];
- _group = createGroup West;
- _rabbitcount = 5;
- for "_x" from 1 to _rabbitcount do {
- _rabbit = _group createUnit ["Rabbit", _this, [], 1, "FORM"];
- [_group,_this] call Make_Em_Spin;
- [_rabbit] joinSilent UnitGroup;
- MyRabbits = MyRabbits + [_rabbit];
- _rabbit addEventHandler ["Killed",{ [(_this select 0), (_this select 1)] call Rabbit_Death; }];
- };
- _hint = parseText format["<t align='center' color='#00FFF5' shadow='2' size='1.75'>Combat Wolf</t><br/><t align='center' color='#ffffff'>Bugs Bunny Isn't going to be happy, Check map for details!</t>"];
- customRemoteMessage = ['hint', _hint];
- publicVariable "customRemoteMessage";
- };
- Rabbit_Death = {
- private ["_rabbit","_player"];
- _rabbit = _this select 0;
- _player = _this select 1;
- MyRabbits = MyRabbits - [_rabbit];
- systemChat format ["%1",(count MyRabbits)];
- };
- Clear_Marker = {
- private ["_markername","_dotname","_pos"];
- _markername = _this select 0;
- _dotname = _this select 1;
- _pos = _this select 2;
- waitUntil {
- sleep 1;
- (count MyRabbits <= 1);
- };
- deleteMarker _markername;
- deleteMarker _dotname;
- [nil,nil,rTitleText,"Bugs Bunny Isn't going to be happy, Check map for details!", "PLAIN",10] call RE;
- _hint = parseText format["<t align='center' color='#00FFF5' shadow='2' size='1.75'>Combat Wolf</t><br/><t align='center' color='#ffffff'>All the rabbits have migrated.</t>"];
- customRemoteMessage = ['hint', _hint];
- publicVariable "customRemoteMessage";
- EPOCH_EVENT_RUNNING = false;
- };
- Rabbit_Mission = {
- if (isNil "EPOCH_EVENT_RUNNING") then {
- EPOCH_EVENT_RUNNING = false;
- };
- if (EPOCH_EVENT_RUNNING) exitWith {
- diag_log("Event already running");
- };
- EPOCH_EVENT_RUNNING = true;
- private ["_pos","_rabbit_pos","_name","_nul"];
- MyRabbits = [];
- _pos = [] call GeneratePos;
- createVehicle ["Land_Misc_deerstand", _pos, [], 0, "CAN_COLLIDE"];
- for "_i" from 1 to 2 do {
- _rabbit_pos = [_pos,0,50,10,0,2000,0] call BIS_fnc_findSafePos;
- _rabbit_pos call Spawn_Rabbits;
- };
- _name = "RabbitHole_" + str(random(round(500)));
- _nul = createMarker [_name, _pos];
- _name setMarkerColor "ColorYellow";
- _name setMarkerShape "ELLIPSE";
- _name setMarkerSize [350,350];
- _dotname = "RabbitHoleDot_" + str(random(round(500)));
- _nil = createMarker [_dotname, _pos];
- _dotname setMarkerColor "ColorBlack";
- _dotname setMarkerType "Vehicle";
- _dotname setMarkerText "Rabbit Breeding Hole";
- [_name,_dotname,_pos] spawn Clear_Marker;
- };
- [] call Rabbit_Mission;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement