OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: FiLL2d on 16 Jul 2006, 16:33:39

Title: flag weapon config name
Post by: FiLL2d on 16 Jul 2006, 16:33:39
anyone know the weapon config name of a 'flag' so i am able to add it to an ammo crate etc.
Title: Re: flag weapon config name
Post by: Mandoble on 16 Jul 2006, 17:16:42
"FlagCarrier"
Title: Re: flag weapon config name
Post by: FiLL2d on 18 Jul 2006, 15:25:14
hmm, thanks but it can't find the weapon :(

No entry 'config.bin/CfgWeapons.FlagCarrier'.
Title: Re: flag weapon config name
Post by: Mandoble on 18 Jul 2006, 19:08:59
try:
Code: [Select]
myflag = "FlagCarrier" createVehicle getPos player

and see what happens.

BTW, AFAIK flags are not weapons.
Title: Re: flag weapon config name
Post by: JasonO on 23 Jul 2006, 21:32:32
I think he means the flag you get after you have taken the flag off the pole, the one you carry. That script produces a flag pole.
Title: Re: flag weapon config name
Post by: Cheetah on 24 Jul 2006, 00:14:31
A flag isn't something you can add to an ammocrate (as far as I know). But there is a method that you can use I think.

- Create a soldier and name it player.
- Create a flagpole and in it's init write: this setflagTexture "rus_vlajka.pac"; this setpos [(getpos this select 0),(getpos this select 1),-10]; Name the flagpole: "vlajkaRUS".
- Create an ammocrate and name it "crate".
- Create a trigger and in it's condition put: ((player distance crate) < 5), in the on Activation Field put:
player addAction ["Take Flag","flag.sqs"];
- Create a file "flag.sqs" and put this code in it: vlajkaRus setFlagOwner player;

The player gets the flag now.
Title: Re: flag weapon config name
Post by: JasonO on 24 Jul 2006, 00:34:21
How would you created it as a single object. Without having to give it to a unit first.
Title: Re: flag weapon config name
Post by: Cheetah on 24 Jul 2006, 15:04:25
Hmm. I don't think that this is possible. As the only objects related to flags you can create are the "FlagCarrier" and "Flags1".
You can only get a flag, I think by getting the flag of these poles. But there might be a solution for you, you might find it after dePBO'ing some CTFs.