OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: The-Architect on 30 May 2005, 16:52:29

Title: Flags
Post by: The-Architect on 30 May 2005, 16:52:29
Ok, here's the problem.

I have a flag fluttering away, I want to walk up to the flagpole, have an action appear which will say "Remove Flag", then I want to click it and have the flag appear on me, like what I think I saw in multiplayer. Next IU want to walk over to my APC which has arrived in the meantime and have another action which says, "Put Flag into APC". Done.

Anyone tell me step by step how to do this?
Title: Re:Flags
Post by: bedges on 30 May 2005, 17:10:29
you need the flagowner (http://www.ofpec.com/editors/comref.php?letter=F#flagowner) command. i'm guessing with just that you could figure it out, but here goes ;)

flagpoles automatically have "take the flag" actions associated with them, so you may just need a trigger to check if the flagowner of flag_name is the player -

Code: [Select]
? flagOwner flag_name == player
next, trigger over the vehicle, set to trigger on player present, on activation player addaction "Put flag on APC", run script which says

Code: [Select]
flag_name setflagowner apc_name

done.
Title: Re:Flags
Post by: The-Architect on 30 May 2005, 17:48:18
I don't get it.
Title: Re:Flags
Post by: bedges on 30 May 2005, 18:02:34
voila.

i neglected to mention the flag needs to be set to the enemy's side, thus activating the 'take flag' action...  ::)