OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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.
-
"FlagCarrier"
-
hmm, thanks but it can't find the weapon :(
No entry 'config.bin/CfgWeapons.FlagCarrier'.
-
try:
myflag = "FlagCarrier" createVehicle getPos player
and see what happens.
BTW, AFAIK flags are not weapons.
-
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.
-
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.
-
How would you created it as a single object. Without having to give it to a unit first.
-
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.