OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Bohemia boy on 11 Jul 2004, 11:59:19
-
Is it posible to make a unit carry a flag in SP mission? LIke in a capture the flag MP.
Thanks
Greetings from Bohemia
-
Greetings,
Case study: Official single missions: HUMMWV: All the vehicles carry a flag, seen in the intro, and during the mission. When the player disembarks from his vehicle, he also carries a flag.
No guarantees on this but this is how I think it can be done: Place down a flagpole somewhere (possibly where it cannot be seen by the player) and name it. Place the flag that you want the unit to carry on it (for example, USA_Vlajka.pac). When you want to transfer the flag to a unit, use the code
flagPoleName setFlagOwner unitToCarryFlag.
This way, you can place flags on vehicles as well.
Untested, but it should work. :P
-Supr. Cmdr. PsyWarrior
-Psychic Productions
-
Yeap... that's about right.
Just bear in mind that vehicles cannot carry flags... you have to give them to a unit inside them (say the driver). ;)
So you'd use:
flag setflagowner (driver vehicle)
-
thanks
by any chance do you know the russian flag name
thanks again
-
I believe you are looking for
"Rus_Vlajka.pac"
So:
this setFlagTexture "RUS_Vlajka.pac"
in the flag's init field.
And sui: Quite right. That knowledge must have got lost somewhere along the way... ::)
But the flag does display on the vehicle, so the result is the same.
-Psy|W
-
While we are on flags if you've played that mission HMMV. Then you know the flag can sometimes be going forwards like the wind is behind it even though you are speeding along at 70... :-\
How can this happen? Does the flag just go random ways? ???
I've also noticed this in CTF, it got me killed once cause I cant see through a flag in my face. :( :P
-
Every time you start up OFP, a random wind direction is chosen. Flags will always blow in this direction.
I can't remember if movement speed affects the blowing of the flag, as it's been a while since I have played with any flags in OFP, but I would suspect not.
-Psy|W