Jump to content

Editor Fun


axeman

Recommended Posts

_attachTest={  while{alive player}do{  _trgt = cursortarget;  _nr = nearestObjects [getPos player, [], 10];  if!(isNull _trgt)then{  _trgt setdamage 1;  };  if(count _nr > 0)then{  {  if(_x != player)then{  _x setdamage 1;  };  }forEach _nr;  }; uisleep 0.5;};    };  [] spawn _attachTest;  player allowdamage false;

Ok, so testing something out and ended up creating the wrecking code:

 

Paste into arma 3 editor and rampage.

 

 

Link to comment
Share on other sites

CODE

player addEventHandler ["Fired",
{	private["_projectile","_pos","_dir","_vel","_animal"];

    _projectile = (_this select 6);
	_pos = visiblePosition _projectile;
	_dir = direction _projectile;
	_vel = velocity _projectile;
	deleteVehicle _projectile;
	{_vel set [_forEachIndex, (_x * 0.05)]}forEach _vel;
	_animal = [	"Rabbit_F",
				"Snake_random_F",
				"Turtle_F",
				"Hen_random_F",
				"Cock_random_F",
				"Goat_random_F",
				"Sheep_random_F"
				];
    _animal = createAgent [_animal select (random (count _animal -1)), _pos, [], 0, "CAN_COLLIDE"];
	_animal setVariable ["BIS_fnc_animalBehaviour_disable", true];
	_animal allowDamage false;
	_animal addEventHandler["handleDamage",{false}];
	_animal setPos _pos;
	_animal setDir _dir;
	_animal setVelocity _vel;
	_animal spawn { private "_start"; _start = time;
		if(typeOf _this == "Turtle_F")then{systemChat "I Like Turtles"};
		waitUntil{sleep 1; ({_x == 0}count velocity _this == 3 || time - _start > 5)};
		_this removeAllEventHandlers "handleDamage";
		_this allowDamage true;	doStop _this;
		while{alive _this}do{	sleep 1;
			_this moveTo (position player);
		};
	};
}];

Have fun ;)

Link to comment
Share on other sites

CODE

player addEventHandler ["Fired",
{	private["_projectile","_pos","_dir","_vel","_animal"];

    _projectile = (_this select 6);
	_pos = visiblePosition _projectile;
	_dir = direction _projectile;
	_vel = velocity _projectile;
	deleteVehicle _projectile;
	{_vel set [_forEachIndex, (_x * 0.05)]}forEach _vel;
	_animal = [	"Rabbit_F",
				"Snake_random_F",
				"Turtle_F",
				"Hen_random_F",
				"Cock_random_F",
				"Goat_random_F",
				"Sheep_random_F"
				];
    _animal = createAgent [_animal select (random (count _animal -1)), _pos, [], 0, "CAN_COLLIDE"];
	_animal setVariable ["BIS_fnc_animalBehaviour_disable", true];
	_animal allowDamage false;
	_animal addEventHandler["handleDamage",{false}];
	_animal setPos _pos;
	_animal setDir _dir;
	_animal setVelocity _vel;
	_animal spawn { private "_start"; _start = time;
		if(typeOf _this == "Turtle_F")then{systemChat "I Like Turtles"};
		waitUntil{sleep 1; ({_x == 0}count velocity _this == 3 || time - _start > 5)};
		_this removeAllEventHandlers "handleDamage";
		_this allowDamage true;	doStop _this;
		while{alive _this}do{	sleep 1;
			_this moveTo (position player);
		};
	};
}];

Have fun ;)

 

Not gonna lie. My favorite are the turtles. They look godram majestic.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...