Jump to content
Sign in to follow this  
Juixius

Detecting if bunnies are within a radius of a player

Recommended Posts

I want to make just a fun mission where blufor players are on the top of a hill in a make shift base, and everyone else are bunnies that explode when they get close to a blufor player. Also, this would be helpful for more practical missions, not just silly ones.

Share this post


Link to post
Share on other sites

Haha. Love the concept. I know that it's simple to check entities near units . Then you would need to use type of to filter down to the rabbits. Unfortunately I'm on my phone so I can't give a example right now

Share this post


Link to post
Share on other sites
{_x setDamage 1} forEach (player nearEntities ["Rabbit_F", 5]);

Share this post


Link to post
Share on other sites
{_x setDamage 1} forEach (player nearEntities ["Rabbit_F", 5]);

Either this doesn't work or I don't know how to use it. Doesn't this code say that if a player is with 5 meters of a bunny, then the player will die? If so, it doesn't work because I want both the bunnies and blufor to be players.

Share this post


Link to post
Share on other sites

lol Interesting concept :D

put something along the lines of

handle = this spawn {
_wabbit = _this;
while {alive _wabbit} do {
	_Elmas = _this nearEntities ["CAManBase", 5];
	if ({side _x == blufor} count _Elmas > 0) then {
		"HelicopterExploBig" createVehicle getPosATL _wabbit;
	};
	waitUntil {true};
};
};

on your bunnies.

Share this post


Link to post
Share on other sites
lol Interesting concept :D

put something along the lines of

handle = this spawn {
_wabbit = _this;
while {alive _wabbit} do {
	_Elmas = _this nearEntities ["CAManBase", 5];
	if ({side _x == blufor} count _Elmas > 0) then {
		"HelicopterExploBig" createVehicle getPosATL _wabbit;
	};
	waitUntil {true};
};
};

on your bunnies.

Thanks! This works perfectly. Also, that explosion is fps death. I love it!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×