OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: B-2-0 on 24 May 2003, 15:02:42

Title: Self repairing crates and med-tents
Post by: B-2-0 on 24 May 2003, 15:02:42
How can i make ammo crates and med-tents self repair if they are blown up or drove over?

Thanx in advance :)
Title: Re:Self repairing crates and med-tents
Post by: Knut Erik on 24 May 2003, 16:11:08
Hmm. You could try this.
Goes in the INIT field of the tent/AmmoCrate


This addEventHandeler ["Killed" , {This setdammage 0}]
This addEventHandeler ["Hit" , {This setdammage 0}]


Does it work  :-\
Title: Re:Self repairing crates and med-tents
Post by: deaddog on 24 May 2003, 16:14:40
Use a repeating trigger:

activation:  none

use "timeout" instead of "countdown" and set min, med, max to 5.  I found if there was no delay then the tent would not always get repaired.  You can adjust the time if you want.

condition: getdammage tentname > .9

on activation: tentname setdammage 0
Title: Re:Self repairing crates and med-tents
Post by: B-2-0 on 24 May 2003, 17:34:27
Hi,
     Sorry Erik, your way doesn't work, DeadDog's does tho! :)

Thanx for both of your replies :thumbsup: