bear trap

Posts 1–6 of 6 · Page 1 of 1
bear trap
Anyone know the code to spawn a bear trap?

A search has thrown up nothing
Code:
TrapBear
Is the code AFAIK, I don't have time to look it up, but I think that's it if I remember right.
I have NEVER seen a bear trap in game.
I did a mistake and spawned like 200 armed bear traps in our camp.. I had to manually remove them all again be careful with these littl bastards..
I have already get and use a bear trap but is bugged when you use it he are on the air.
wuat had a couple...it's funny as hell to use.

If you wanna mess around with them make a folder structure of "wuat\scripts\" and place both of these in there. Make sure to execute beartrap.sqf first.

Beartrap.sqf:
Code:
[3, 9, 250, 1000, (position player), 30] execVM '\wuat\scripts\MineField.sqf';
MineField.sqf:
Code:
_width = _this select 0; // In metres.
_length = _this select 1; // In metres.
_shells = _this select 2; // Total shells to expend.
_speed = _this select 3; // In km/h.
_Pos = _this select 4; // Centre of strike.
_dir = _this select 5;

_shellsPerMetre = _shells / _length;
_speedMps = _speed;
_timePerShell = 1 / (_shellsPerMetre * _speedMps);

sleep 1;

hint "Here it comes...";



_expectedtime = time;

//sleep 2;

for [{ _i = -(_length / 2) }, {_i < (_length / 2) }, { _i = _i + (1 / _shellsPerMetre) }] do
{
	// Horizontal deviation. This is a more linear spread than
	// (random 80) - (random 80), which has most bombs nearer the centre line.
	_rnd = (random _width) - (_width / 2); 
	
	_round = "BearTrap_DZ" createVehicle [(_Pos select 0) + (_i * sin _dir) + (_rnd * cos _dir), (_Pos select 1) + (_i * cos _dir) + (_rnd * sin _dir), (_Pos select 2)];
	_round animate ['LeftShutter', 0];
	_round animate ['RightShutter', 0];

	_expectedtime = _expectedtime + _timePerShell;
	if (_expectedtime > time) then
	{
		sleep (_expectedtime - time);
	};
};
[COLOR="Silver"]
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us