OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Kilo11 on 04 Jul 2003, 21:03:32

Title: Ending Mission Based On Player Position
Post by: Kilo11 on 04 Jul 2003, 21:03:32
PLEASE HELP ME!!!!!!!move]

Hey all.  I have a quetion:

I want to end a mission with a trigger, when my group of men is in a helicopter.  Does anybody know how to do this?  I need the command that will check if the player is in the chopper.  In this case, the chopper name is called "Chopper1".  Any help would be greatly appreciated, I have had trouble on this for weeks.  Thank you!

-=Ricochet=-
Title: Re:Ending Mission Based On Player Position
Post by: Igor Drukov on 04 Jul 2003, 21:09:15
Hey Kilo  :wave:,

go here (http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=10960).
Title: Re:Ending Mission Based On Player Position
Post by: Kilo11 on 04 Jul 2003, 21:36:50
Thank You!

But I still got a problem.  Lets say I have a squad that is getting into a chopper.  And i use the (man1 in chopper) and (man2 in chopper) and (man3 in chopper) and so on...  Now when they all board I have the trigger set to "End 1".  And it works :-)  But when one of them dies, it doesn't.  So how can I get around this????

-=Kilo=-
Title: Re:Ending Mission Based On Player Position
Post by: Igor Drukov on 04 Jul 2003, 21:41:58
If all your men are in the same group, give the group a name :

Code: [Select]
mygroup=group this
in the init field of the leader.

Then, in the condition field of your trigger :

Code: [Select]
"_x in chopper" foreach units mygroup
That way, the trigger will activate if the whole group has boarded the chopper, but regardless of the potential casualties.

*edit*

wooooops, this doesn't work, for some reason. Back in a few minutes with a REAL answer.
Title: Re:Ending Mission Based On Player Position
Post by: Kilo11 on 04 Jul 2003, 21:46:12
Thank you, but when I put that in the condition field it didn't work.

It says Error Type Nothing, Except Bool

-=Kilo=-
Title: Re:Ending Mission Based On Player Position
Post by: Igor Drukov on 04 Jul 2003, 21:47:35
True, hold on.
Title: Re:Ending Mission Based On Player Position
Post by: Kilo11 on 04 Jul 2003, 21:51:05
ok, thank you for your help.  Holding....

-=Kilo=-
Title: Re:Ending Mission Based On Player Position
Post by: Igor Drukov on 04 Jul 2003, 21:51:35
Awrighty, type this in the condition field :

Code: [Select]
"_x in chop" count units mygroup==count units mygroup
This works, I've tested it BEFORE posting ::) ;D