Home   Help Search Login Register  

Author Topic: SetFlagSide doesn't set flag's side  (Read 497 times)

0 Members and 1 Guest are viewing this topic.

Offline Lacota

  • Members
  • *
  • I'm a llama!
SetFlagSide doesn't set flag's side
« on: 08 Oct 2004, 03:12:43 »
What am I missing here. I call setflagside like so;

MyFlag setFlagSide West
hint(side MyFlag)

and the hint says civ which is how the flag is initialized. Are there rules around when a flag's side can be set?

Thanks Guys

xenofanes

  • Guest
Re:SetFlagSide doesn't set flag's side
« Reply #1 on: 08 Oct 2004, 12:18:12 »
I REALLY  don't know, but maybe brackets are needed, like so:
MyFlag setFlagSide "West"

 ???  ???  ???
  ???  ???
 ???  ???  ???

Offline Platoon Patton

  • Members
  • *
  • "Barbecue" CreateVehicle getpos LLama
Re:SetFlagSide doesn't set flag's side
« Reply #2 on: 08 Oct 2004, 18:46:05 »
Myflag SetFlagside West is correct,no brackets needed.

Try hint format["Flag owned by %1",side MyFlag]
http://www.platoon-clan.com/ We always wellcome dedicated OFP players :)

http://www.european-combat-league.com/index.php To play with us in the best OFP league ;)

Offline Lacota

  • Members
  • *
  • I'm a llama!
Re:SetFlagSide doesn't set flag's side
« Reply #3 on: 09 Oct 2004, 03:10:58 »
Thanks guys

Side function doesn't seem to be supported for flags. Kind of annoying.

Offline Platoon Patton

  • Members
  • *
  • "Barbecue" CreateVehicle getpos LLama
Re:SetFlagSide doesn't set flag's side
« Reply #4 on: 09 Oct 2004, 14:00:32 »
U could work with a Variable,Flagstatus.

Flagstat =0   means Neutral
Flagstat =1   means Flag is West
Flagstat =2   means Flag is East
....
Code: [Select]
Myflag SetFlagside West ; Flagstat = 1
?(Flagstat == 0): _flagmsg = "NEUTRAL"
?(Flagstat == 1): _flagmsg = "WEST"
?(Flagstat == 2): _flagmsg = "EAST"
hint format ["Flag owned by %1",_flagmsg]

http://www.platoon-clan.com/ We always wellcome dedicated OFP players :)

http://www.european-combat-league.com/index.php To play with us in the best OFP league ;)

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:SetFlagSide doesn't set flag's side
« Reply #5 on: 09 Oct 2004, 16:33:17 »
this is an excerpt from a script by Karillion that I use for ctf's.  Call this script from the init.sqs:

Code: [Select]
;;CTF script by KaRRiLLioN
;;This selects the flag's name

_flag = _this select 0
?(isnull _flag):goto "end"

;;The following simply sets the textures on the flags and can be
;;changed to whatever you want.  You could actually
;;remove the ?(_flag==FlagW) and instead just put in
;;FlagW SetFlagTexture "\Flags\Nato.jpg and do the same
;;for each one.

?(_flag==FlagW):_flag setflagtexture "\Flags\nato.jpg"
?(_flag==FlagE):_flag setflagtexture "\Flags\Ussr.jpg"
;;?(_flag==FlagR):_flag setflagtexture "\Flags\Pirates.jpg"

;;This just creates a name for when the flag is taken or
;;capped or dropped.

?(_flag==FlagW):_flagname="the NATO Flag"
?(_flag==FlagE):_flagname="the Soviet Flag"
?(_flag==FlagR):_flagname="the Resistance Flag"

;;This inits the flagside for each flag.

?(_flag==FlagW):_flag SetFlagSide WEST
?(_flag==FlagE):_flag SetFlagSide EAST
?(_flag==FlagR):_flag SetFlagSide RESISTANCE

;;this sets the flag owner to nobody

_flag setFlagOwner objNull
_death=1

#start
~1
_flagowner=Flagowner _flag
?(isnull _flagowner):Goto "start"
?(Side _flagowner==WEST):_team="NATO" ;_flagownerside=WEST
?(Side _flagowner==EAST):_team="Soviets"; _flagownerside=EAST
?(Side _flagowner==RESISTANCE):_team="Resistance"; _flagownerside=RESISTANCE
?(alive _flagowner): _death=1
?(_death==0):Goto "Flagreturn"
?!(Alive _flagowner):Goto "DeadHasFlag"

Offline Lacota

  • Members
  • *
  • I'm a llama!
Re:SetFlagSide doesn't set flag's side
« Reply #6 on: 10 Oct 2004, 16:37:06 »
Thanks for the replies. I guess I was crazy to think that since you could set the flag's side, that you should be able to read it. I found a suitable work around that involves using a marker.