OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: BRAVO-TWO on 01 Jan 2006, 22:39:22
-
trying to have a vehicle and the units guarding it start in one of three possible locations .. failing miserabaly..
any help as always will be greatly appreciated..
also can you get enemy patrols to react upon sighting a dead body..
thanx and happy new year to all
shark attack
:cheers:
-
1. You could group 'em buggers with a marker. However, that'll probably make them end up scattered in all three locations. I'd script it. Do a random check then setpos/createUnit the lads/vehicles where you want them.
2. Yeah. LCD made a detect body script a while back. I'd do a search in the scripting: beta testing board.
-
If your guards are in the same group, you can link them with two empty markers. Then simply SetPos the object at somewhere around the group leader.
Grunts and objects will all have their positions adjusted to that of the leader :).
As to your 2nd Q, this link (http://www.ofpec.com/editors/resource_view.php?id=241) could be useful. It's about hidden bodies, but it gives you the general idea.
-
thanx guys for youre input
however the vehicle must have an exact location and the units guarding it are not grouped .. trying to have each guard react diferently to a situation..
also scripts for detecting dead bodies all seem to focus on wether or not they are buried .. i would like any member on the enemys side to react to the discovery of any dead body.. have tried condition not (alive unit) but it dosnt look right ..
and one more thing
trying to guarentee that if certain named russian unit is hit he will cry out (arggg) and a trigger can be fired by this..
have looked at the hit kill sqs in editors depot ..(usefull but not what i need)
i guess an event handler is the answer
unitname AddEventHandler ["hit",{_this exec "hit.sqs"}]
but what would i enter in my hit.sqs to force the unit to cry out..
thanx again guys
shark attack
-
1) Link the car wreck to the empty markers, then setpos the loons around that car wreck.
2) if you don't care about whether the bodies are buried or not, the easiest would be to use the KnowsAbout command.
In the condition line of a trigger :
(!(alive loon1) and ((loon2 KnowsAbout loon1)>1.5 or (loon3 KnowsAbout loon1)>1.5)) or (!(alive loon2) and ((loon1 KnowsAbout loon2)>1.5 or (loon3 KnowsAbout loon2)>1.5)) or (!(alive loon3) and ((loon1 KnowsAbout loon3)>1.5 or (loon2 KnowsAbout loon3)>1.5))
That should do the trick.
3) Another trigger, condition :
loon1IsHit
In the init line of loon1 :
this addEventHandler [{Hit},{loon1IsHit=true}]
You might want to take a look at KeyCat's GroupLinkII (http://www.ofpec.com/editors/resource_view.php?id=498). It'll do exactly what you want, and even more :).
P.S. : previewing the post... the variable is LOON1-IS-HIT not LOON1I-SH*T :-X
-
thanx igor..looking into it
regards
shark attack