OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Silencer on 03 Apr 2005, 01:11:14

Title: Indestructible objects
Post by: Silencer on 03 Apr 2005, 01:11:14
Hey all,

Is it possible to make objects indestructible?
(It is for a MP map)
Title: Re:Indestructible objects
Post by: General Barron on 03 Apr 2005, 04:35:26
Try adding this to their init line (or replace 'this' with 'object xxx' for map objects):

this addeventhandler ["hit", {(_this select 0) setdammage 0}]

Title: Re:Indestructible objects
Post by: Silencer on 03 Apr 2005, 11:52:39
I want a fence to be indestructible, so if a car drives against it, the fence will still stand.

this addeventhandler ["hit", {(_this select 0) setdammage 0}]

does work a little, but the fence will still be down if you drive fast enough
 :-[
Title: Re:Indestructible objects
Post by: Blanco on 03 Apr 2005, 14:09:13
Those fences have very low armour, so the slightest contact will destroy it and the EH will react to late.
Try to use a brick wall (maybe a low one) if it fits in your mission.
Title: Re:Indestructible objects
Post by: DBR_ONIX on 05 Apr 2005, 19:22:47
If possible, make a simple addon that has a think geolod, that's it. Put it over the fence.. you'll smack into geolod, not the fence
If that's not possible, hmm.. a trigger over the fence, and aboiut a meter either way, grouped to the cars, if any of htem get within that trigger, it gets setvelcity [0,0,0], so it'll stop isntaltly

- Ben
Title: Re:Indestructible objects
Post by: Silencer on 05 Apr 2005, 19:50:17
Good idea, I will try the SetVelocity thing :)
Thanks!
Title: Re:Indestructible objects
Post by: Silencer on 09 Apr 2005, 17:26:02
The car allready hit the fence before it stops :(
So the SetVelocity command is too slow :-\

Any other ideas?
Title: Re:Indestructible objects
Post by: Platoon Patton on 09 Apr 2005, 17:32:56
Put some other objects in front of your fence,so the car hits that instead of the fence.

Try tree stump,concrete block,....
Title: Re:Indestructible objects
Post by: Terox on 09 Apr 2005, 19:00:46
put a tank trap infront of it, nothing bends those things
Title: Re:Indestructible objects
Post by: Silencer on 09 Apr 2005, 19:08:18
Are there invisible walls?
Then it would look normal, but you can't drive over the fences!
Title: Re:Indestructible objects
Post by: Blanco on 09 Apr 2005, 19:25:55
Not that I know about, Silencer

Title: Re:Indestructible objects
Post by: Planck on 09 Apr 2005, 19:31:09
There is an invisible fence in O.pbo, but there is no config entry anywhere for it.
That and an invisible house.    ;D


Planck