OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: greg147 on 22 Jan 2005, 18:25:45
-
I'm trying to make a mission that involves you firing a grenade at a building (thats not all of it, just a small part ;D ), but I need it so if the player fires within a certain area of the building (or by trigger), an object explodes (just setdamage 1). So, if I fired a grenade from 50 metres away, nothing extra would happen, but if I fired it from 20 meres away, a trigger would activate. Is this possible?
And one more thing, whats the line for when a unit reaches a certain damage. Like, if when the player got to half dead, a trigger would activate. ;)
Thanks for any help
-
2) dammage unitname > 0.5
-
Thanks for that one ;)
Anyone know the answer to the first one?
-
I have not tested it but a fired event handler might be used to run a scrip that checks how far away you are.
-
what i would do is set the trigger so that
condition: building distance player > 5 (or whatever) and damage building > .5
on activation: blah blah blah
-
Ah yeah, that could work. I'll try that ;)