OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Marksman on 25 Jun 2004, 01:19:31

Title: Can you detect who / what hit a building?
Post by: Marksman on 25 Jun 2004, 01:19:31
Hi,

I'm in the process of writing a script which requires to know what unit attacked a building.

The "hit" event handler doesn't work, as it only works on men + vehicles.

Is there a script command i could use instead??

Cheers,

Marksman
Title: Re:Can you detect who / what hit a building?
Post by: macguba on 25 Jun 2004, 11:52:04
In general units don't attack buildings so I don't fully understand the problem.

Can you tell us more about what you are trying to do?
Title: Re:Can you detect who / what hit a building?
Post by: Marksman on 25 Jun 2004, 12:29:09
To add some realism effects to pipes, fuel tanks etc..

e.g.

A bullet hits a fuel tank, the tank doesn't explode, but does cause a leak


I have a script to create particle effects at the right point on the object, but need the relative position and direction of the attacker, with respect to the objects origin.

This info + a bit of trig, allows the effect to be created at the correct position on the object.

(Imagine a 50m long pipeline object, or large fuel tank object)

To get the info required, i need to find outthe ID of who / what attacked the object / building

Cheers,

Marksman