OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: mcnils on 26 Sep 2002, 07:35:48

Title: BlackOp behind russian: Freeze!
Post by: mcnils on 26 Sep 2002, 07:35:48

Well there was a post asking how to make
a soldier "switchmove to surrender"..

I had an idea..
why not make it possible (for black op missions or such)
to sneak behind an enemy patrooling,
and if you are able to sneak right behind (in front the soldier would see you and shoot you),
to make him droop his weapon and "switchmove to surrender"!


like in MGS2!  8)

Snake: Freeze!
soldier: huh!? *hands up*


I think this can be done with somekind of mobile triggers or markers or something like that..
I mean if you see an enemy near you pointing his weapon on your head,
you will surrender and dont play rambo.. if this is realizable with a script..
It would make missions much more realistic...



ah well... i am the fool ideas expert here lol ::)
Title: Re:BlackOp behind russian: Freeze!
Post by: icarus_uk on 26 Sep 2002, 14:57:00
Im not sure how easy it would be.  I havent yet found a way of knowing which target is targeting which other target.  So theres no way of saying;

"Man1 is targeting Man2; Man2 Surrenders".

What I have done is a simple script for fleeing.  When a unit naturally runs away from the battle he drops his weapons and stands up with his hands behind his head.
Title: Re:BlackOp behind russian: Freeze!
Post by: KTottE on 26 Sep 2002, 16:18:16
What you could do is have a square trigger extending out behind each soldier, and when the player enters that the whole surrender thing plays out.

Title: Re:BlackOp behind russian: Freeze!
Post by: mcnils on 27 Sep 2002, 02:21:40

Yes thats what i also thought..
but because i am not really THE scripting ace here ^__^
..maybe someone other knows how to handle this..




*wants to get deeper in scripting because his ideas that he can not realize are killing him*


:-\
Title: Re: BlackOp behind russian: Freeze!
Post by: Martin Kuka on 11 Aug 2006, 08:15:09
Well, think you need a couple of things 1st.
1st you need a script which will calculate how far a blackop is from a russian.
Then you need a trigger covering whole area around patrolling russian.
The trigger has to be set like:

Activation west detected by east - simple, we need this trigger to cancel main scripting trigger if you are spotted.
This will prevent to arrest him while standing in front.
Then setup another trigger (main) which will have in condition field the check whether blackop is 1 meter behind russian
or not. If he is 1 meter or less behind him and undetected trigger will off and activate a script.

In main script you will need few commands:

unitname removeallweapons
Setcaptive TRUE

and:

unitname switchmove "FXStandSurUniv" which makes him putting his hands behind head.

Guess Im noob in scripting. I can write the script but It will take a looong time as I need all scripts to be tested few times before posting it.
And then you need to remove russians weapons 1st because captured unit can still fire back if has a weapon.