OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started by: KevBaz on 15 Jul 2009, 09:24:19

Title: End mission on flag raise
Post by: KevBaz on 15 Jul 2009, 09:24:19
Hiya, having trouble getting this to work

I want to End the mission when a blufor raises the US flag

any ideas?
Title: Re: End mission on flag raise
Post by: nominesine on 15 Jul 2009, 09:29:23
Good idea. I see a MP Coop on top of a hill. Remember to take a screen shot when it's done  :D

The solution seems simple to me. The empty flagpole wont display any flag at all, unless you use setObjectTexture to do so. It should be fairly easy to include the ending conditions in the same script, trigger, whatever that fires off the texture command.

I'd go for a mix of addAction - (script) - setObjecttexture & endMission

Your question is rather non-specific. Thus the non-specific answer to your post.
Title: Re: End mission on flag raise
Post by: KevBaz on 15 Jul 2009, 10:08:04
Hehe ok il lbe a bit more specific

Basically its for the end of my We Were Soldiers map, (but i have other ideas for team v team maps) its currently not ending, the flag in question has the russian flag flying currently and when you raise the us flag you stand and salute (corny i know :P) but i cant get it to actually end the missionand display you won etc etc

thanks
Title: Re: End mission on flag raise
Post by: nominesine on 15 Jul 2009, 10:24:56
Okay. That'll give me something to work with. I'll download your mission (was going to anyway) and check out the situation at hand. It will take me a while though. I'm extremely busy at work this week and throughout the weekend.
Title: Re: End mission on flag raise
Post by: laggy on 20 Jul 2009, 12:52:16
Maybe this is a solution to your problem, code taken from the COMREF:

Code: [Select]
_flagholder = flagOwner flagOne
You might be able to use it like this:

Code: [Select]
flagOwner USflag == russianFlagpole
Don't know, but something similar might be a solution.

See link: http://www.ofpec.com/COMREF/index.php?action=details&id=135&game=All