Sign in to follow this  
LordRampantHump

Hide Object Local only

3 posts in this topic

Hi guys

 

Im trying to spawn a Rabbit only on the clients side

Currently all clients or no clients can see it.

 

I am trying various attempts like this:

		   _grp = group player;
		  _rabbit = _grp createUnit ["Rabbit_F",position player,[],0,"NONE"];
          _rabbit hideObjectGlobal true; 
          _rabbit hideObjectLocal false; 

any advice?

Share this post


Link to post
Share on other sites

first use createAgent for animals like arma do it on standard, if u used createUnit ur rabbits will  be able to communicate via radio ("case fire") ec. 

tr = createTrigger ["EmptyDetector", player modelToWorld [0, 10, 0]];
tr setTriggerArea [5, 5, 0, true];
tr setTriggerActivation ["CIV", "PRESENT", true];
rabbits = [];
private "_r";
for "_i" from 1 to 10 do {
	_r = createAgent ["Rabbit_F", position tr, [], 0, "NONE"];
	_r setVariable ["BIS_fnc_animalBehaviour_disable", true];
	rabbits pushBack _r; 
};
tr setTriggerStatements [
	"if (rabbits isEqualTo thisList) exitWith {
		_r = thisList select floor random count thisList;
		_r moveTo (_r modelToWorld [2.5 - random 5, 2.5 - random 5, 0]);
	};
	_esc = rabbits - thisList;
	doStop _esc;
	{_x moveTo position thisTrigger} forEach _esc;
	systemChat str [time, _esc];
	false",
	"",
	""
];

for controlling the animals it give this commands:
 

Dog
Stop:
_dog playMove "Dog_Stop";
Sit:
_dog playMove "Dog_Sit";
Walk:
_dog playMove "Dog_Walk";
Run:
_dog playMove "Dog_Run";
Sprint:
_dog playMove "Dog_Sprint";
Back to default behaviour:
_dog playMove "Dog_Idle_Stop";

Sheep
Stop:
_sheep playMove "Sheep_Stop";
Walk:
_sheep playMove "Sheep_Walk";
Run:
_sheep playMove "Sheep_Run";
Back to default behaviour:
_sheep playMove "Sheep_Idle_Stop";

Goat
Stop:
_goat playMove "Goat_Stop";
Walk:
_goat playMove "Goat_Walk";
Run:
_goat playMove "Goat_Run";
Back to default behaviour:
_goat playMove "Goat_Idle_Stop";

Rabbit
Stop:
_rabbit playMove "Rabbit_Stop";
Hop:
_rabbit playMove "Rabbit_Hop";
Back to default behaviour:
_rabbit playMove "Rabbit_Idle_Stop";
Cockerel
Stop:
_cock playMove "Cock_Stop";
Walk:
_cock playMove "Cock_Walk";
Run:
_cock playMove "Cock_Run";
Back to default behaviour:
_cock playMove "Cock_Idle_Stop";

Hen
Stop:
_hen playMove "Hen_Stop";
Walk:
_hen playMove "Hen_Walk";
Back to default behaviour:
_hen playMove "Hen_Idle_Stop";

Snake
Stop:
_snake playMove "Snakes_Stop";
Move:
_snake playMove "Snakes_Move";
Back to default behaviour:
_snake playMove "Snakes_Idle_Stop";

2. ur problem:
object hideObjectGlobal true; = hides object on all connected clients . need to be run serverside

object hideObject true;/ hideobject unitName; = hide objects for soldiers ,vehicles or static objects(why o,o)  .need to be run clientside 

so u need a script what any client is running for disabled the rabbit with hideObject

or take the old a2 methode

deleteCollection unitName; = like hideObject

Edit:  Benargee

Quote

When used on player, it only has an effect on third person mode. First person LOD is still visible. (A3 Dev 1.33)

 

Edited by Warsheep

Share this post


Link to post
Share on other sites
Advertisement

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.