• 0
Xtortion

[Solved] Making objects indestructible.

Question

Posted (edited)

Hiya folks - 

 

I got my custom traders going on on my server where I made all the objects through M3-Editor and putted it all on the server when I was done.

 

Now the problem is. The items that are on the server are able to be destroyed by players.

For example I can get my car and drive at the trader sign and the trader sign would be gone or I could shoot some small objects and they would be destroyed/blow-up or what so ever.

Basically what I want for these items to stick on the position I put them on and able to be moved at all (like be on the static point I set them to) and not being able to be destroyed either.

 

This is what I got now down below on the file:

{
	private ["_obj"];
	_obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
	if (_x select 4) then {
		_obj setDir (_x select 2);
		_obj setPos (_x select 1);
	} else {
		_obj setPosATL (_x select 1);
		_obj setVectorDirAndUp (_x select 3);
	};
} foreach _objs;

And if also needed, you can see here what I got behind the object/coords

 

	["Land_Lampa_sidl",[7443.68,8091.85,0.29866],221.364,[[-0.660837,-0.75053,0],[-0,0,1]],false]

 

And that's pretty much it, if anyone could help me with this, it would be greatly appreciated :)

 

 

Edited by Xtortion

Share this post


Link to post
Share on other sites

10 answers to this question

  • 1
11 minutes ago, Xtortion said:

Well after doing this the objects aren't even spawning anymore xD 

/*

_objects =
[

];

*/
{
    private ["_object"];

    _object = (_x select 0) createVehicle [0,0,0];
    _object setDir (_x select 2);
    _object setPosATL (_x select 1);
    _object allowDamage false;
    _object enableSimulationGlobal false; // :)
}
forEach _objects;

 

Try this, I have a feeling that you are adding the top portion as well.

 

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

I will post the proper end on initserver with the handle damage.

Share this post


Link to post
Share on other sites
Advertisement
  • 0

_objects =
[

];
{
    private ["_object"];

    _object = (_x select 0) createVehicle [0,0,0];
    _object setDir (_x select 2);
    _object setPosATL (_x select 1);
    _object allowDamage false;
    _object enableSimulationGlobal false; // :)
}
forEach _objects;

Share this post


Link to post
Share on other sites
  • 0

Well after doing this the objects aren't even spawning anymore xD 

Share this post


Link to post
Share on other sites
  • 0

Posted (edited)

Alright - I actually forgot to add some stuff on the toplines actually as it was still from the old lines (Had the old one on top still and only pasted the last parts)

 

private ["_object"];
_objects =
[

["MyObjectHere",[MyCoordinationsHere]],false]

];

{
    private ["_object"];

    _object = (_x select 0) createVehicle [0,0,0];
    _object setDir (_x select 2);
    _object setPosATL (_x select 1);
    _object allowDamage false;
    _object enableSimulationGlobal false; // :)
}
forEach _objects;

 

Now it is all working and nothing is taking damage, but just one thing right now - All the lamps I got placed are not working anymore at night. Is this because of the '     _object enableSimulationGlobal false; ' line ? Anyway to make these lamps work anyway ?

 

//edit

 

Although I'm thinking now perhaps I can just call the lights from another file and just not include the

'  _object enableSimulationGlobal false; ' so the lights would still work.

Edited by Xtortion

Share this post


Link to post
Share on other sites
  • 0

InitServer2.sqf

_objects = [ LAmps_Go_Here];


{    

private ["_object"];  

  _object = (_x select 0) createVehicle [0,0,0];

    _object setDir (_x select 2);  

  _object setPosATL (_x select 1);

    _object allowDamage false;

}

forEach _objects;

 

Possibly ?

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Mate.. !

You're the absolute champ man :)

Everything is working perfectly now! Thanks a lot for your help again

 

Cheers!

1 person likes this

Share this post


Link to post
Share on other sites
  • 0
6 minutes ago, Xtortion said:

Mate.. !

You're the absolute champ man :)

Everything is working perfectly now! Thanks a lot for your help again

 

Cheers!

I never get to help people because my skills are so weak. So, when i am able i try as hard as i can.

Thanks for the reply. Glad its working!

Josh

Share this post


Link to post
Share on other sites
  • 0

We have marked this thread as solved and closed it. 

1 person likes this

Share this post


Link to post
Share on other sites
Advertisement
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.