Home   Help Search Login Register  

Author Topic: CTF Problem  (Read 3911 times)

0 Members and 1 Guest are viewing this topic.

LAPD

  • Guest
CTF Problem
« on: 19 Jan 2003, 20:01:25 »
I was following the CTF tutorial by Backoff. My CTF is ready, and I played it with friends, but there is one bug: when someone takes the flag from a dead soldier there isn't a meesage that says "**** has the flag". It only appears if I lie down. I want it to be written right one you take the flag from the dead body. I guess this is the part that this problem is realted to: (if it isn't, go to the Editors Depot -> Multiplayer tutorials -> Capture the Flag tutorial by Backoff.

Quote
CTF Mechanism

Need three triggers: one to detect if someone take the flag, one if the owner is killed and one if the owner bring the flag to the goal:

Trigger 3

X: 0
Y: 0
Activate: Repeatedly
Text: Flag Taken
Condition: !FlagTaken AND (flagowner Flag1 in List PlayersList)
Activation: OwnerR = FlagOwner Flag1; FlagTaken = True; TitleText [ Format ["%1 has the flag", Name OwnerR], "PLAIN DOWN"]
Effect: anyone, sound: Ucapture

Note: you can't select sounds in the effect dialog box until you create the description.ext file.

Next Trigger will detect if the flag owner is killed:

Trigger 4

X: 0
Y: 0
Text: Owner Dead
CountDown: min 15, max 15, avg 15
Activate: Repeatedly
Condition: FlagTaken AND !(Alive OwnerR)
Activation: OwnerR setFlagowner Flag1; OwnerR = objNull; titletext ["The Flag return", "PLAIN DOWN"]; FlagTaken = False; "0" objStatus "Active";

The next one is used to detect if the owner is in the goal zone:

Trigger 5

X: 0
Y: 0
Text: Flag Capture
Activate: Repeatedly
Condition: FlagTaken AND (OwnerR distance Flag2 < 6)
Activation: kdo = OwnerR; OwnerR = objNull; Flag1 setflagowner objnull; titletext [ format["%1 capture the flag!", name kdo], "PLAIN DOWN"]; FlagTaken = False; kdo addscore 10;
Effect: anyone, sound: Uscore

Can anyone help me?

LAPD

  • Guest
Re:CTF Problem
« Reply #1 on: 20 Jan 2003, 16:29:56 »
Well, I understand it better. It dosen't show it when I lie down, only when the flag returns after 30 seconds and then immidiatly he write that "*** has the flag".
I want it to be written without the flag to get back after 30 seconds (30 seconds after the flag owner dies) , I want the players to know someone took the flag from the dead flag owner right when he took it.
So i tought about making another trigger.
In it's condition field i'll write that the flag was taken and the flag owner is dead.  In the On Activation field i'll write the things the makes the "***** has the flag" to be shown.
If no one takes the flag, then the flag returns 30 seconds after the flag owner died (Trigger 4, look at my post above).
So how can create the trigger which will be activated when the flag was taken from the dead owner and right when someone take it it says "***** has the flag"?
Note that trigger 4 returns the flag after 30 seconds so the trigger i want to create will work between this 30 seconds that you can take the flag from the dead owner.

I Hope this is a better explantion  :)

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:CTF Problem
« Reply #2 on: 20 Jan 2003, 17:33:34 »
The problem i found with Karillions CTF system was

When a friendly player takes the flag from a dead flag runner, he cant score with it

This is the script I use, could somebody point me in the right direction for a fix please

Quote
CTF.sqs (this is the heart of the scoring and such)
 
;;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
 
 
#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):Goto "DeadHasFlag"
 
#FlagTaken
 
titletext[format["%1 (*%3*) has %2!",name _flagowner,_flagname,_team],"PLAIN DOWN"]
PlaySound "FlagTake"
 
Goto "loop"
 
;;the loop continues to check for whether the flagcarrier is
;;dead, or has capped the flag.  Once either happens, the
;;flag is returned
 
#loop
~1
?(!Alive _flagowner):goto "DeadHasFlag"
?(isnull Flagowner FlagW) and _flagownerside==WEST and _flagowner distance FlagW<5:goto "WCaps"
?(isnull Flagowner FlagE) and _flagownerside==EAST and _flagowner distance FlagE<5:goto "ECaps"
?(isnull Flagowner FlagR) and _flagownerside==RESISTANCE and _flagowner distance FlagR<5:goto "RCaps"
 
Goto "loop"
 
;;this increments the score by 1 point for whichever team
;;caps the flag.  You can change the +1 to +5 or whatever
;;you want for a scoring method.  The ?(local Server)
;;makes sure the score is only incremented by the server
;;so that it remains accurate.
 
#WCaps
titletext[format["%1 (*%3*) has captured %2!",name _flagowner,_flagname,_team],"PLAIN DOWN"]
?(local Server):WScore=WScore+1; PublicVariable "WScore"
PlaySound "Capture"
Goto "ShowScore"
 
#ECaps
titletext[format["%1 (*%3*) has captured %2!",name _flagowner,_flagname,_team],"PLAIN DOWN"]
?(local Server):EScore=EScore+1; PublicVariable "EScore"
PlaySound "Capture"
Goto "ShowScore"
 
#RCaps
titletext[format["%1 (*%3*) has captured %2!",name _flagowner,_flagname,_team],"PLAIN DOWN"]
?(local Server):RScore=RScore+1; PublicVariable "RScore"
PlaySound "Capture"
Goto "ShowScore"
 
#ShowScore
?(local Server):ShowScore=true; PublicVariable "ShowScore"
 
Goto "FlagReturn"
 
;;if flagcarrier dies, this resets the flag immediately to the  
;;flagpole.  You can delay this by any time you want by
;;adding a value in seconds just before where it says
;;goto "FlagReturn"
 
#DeadHasFlag
 
titletext[format["%1 (*%3*) has dropped %2",name _flagowner,_flagname,_team],"PLAIN DOWN"]
PlaySound "FlagTake"
 
;;~60 If you remove the ;; then the ~60 will delay the flag
;;returning to the flagpole by 60 seconds.  I leave this off
;;because sometimes someone will try to cap a flag that
;;is on a body and not get there before 60 seconds and the
;;flag disappears on them.
 
 
#FlagReturn
?(_flag==FlagW):_flag SetFlagSide WEST
?(_flag==FlagE):_flag SetFlagSide EAST
?(_flag==FlagR):_flag SetFlagSide RESISTANCE
 
_flag setFlagOwner objNull
_flagreturnmsg=format["%1 has been returned",_flagname]
Hint _flagreturnmsg
 
Goto "start"
 
#end
Exit
 
;;;;END of CTF.SQS


This comes with other supported scripts  but the problem is within this one somewhere
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

LAPD

  • Guest
Re:CTF Problem
« Reply #3 on: 20 Jan 2003, 19:21:04 »
Thanks Terox.  :)
I can't manage to put it in my mission.
I only need a trigger.
I'll put it shortly:

I need a trigger which is activated when someone take the flag from the dead owner and then a message shows someone took the flag (**** has the flag).
I guess that in the conditon field of the trigger i put:
Quote
FlagTaken AND !(Alive OwnerR)

I don't know what to put in the "on activation" field. I need to put there the things which say that if someone takes the flag from the dead body the message will be shown "**** has the flag".

In trigger 3 in the on activation field there is:
Quote
OwnerR = FlagOwner Flag1; FlagTaken = True; TitleText [ Format ["%1 has the flag", Name OwnerR], "PLAIN DOWN"]

I guess in the trigger I want there supposed to be something like that, just that the flagowner is not Flag1.

I hope you understands me  :)
I really want this last bug in my FF (Flag Fight) solved/.

Pope_Zog

  • Guest
Re:CTF Problem
« Reply #4 on: 22 Jan 2003, 12:25:26 »
Change the condition of trigger 3 to:

Quote
(!FlagTaken AND flagowner Flag1 in List PlayersList) OR (FlagTaken AND flagowner Flag1 in List PlayersList AND FlagOwner Flag1 != OwnerR)

Pope Zog

LAPD

  • Guest
Re:CTF Problem
« Reply #5 on: 22 Jan 2003, 15:25:08 »
Thanks mate  :).

I discovered a new problem  :-\.
When someone take the flag he preform the action of taking the flag.
My problem is that if you take the flag and being shot to death while taking the flag and preforming the action, it won't count that the flag was taken and the flag won't come back to the flag pole after 30 seconds.

Can anyone help me?

I think I need a trigger for it.

Modify: When I take the flag from a dead body the flag returns to the flag pole after a few seconds (depands how much time you took the flag after the flag owner was killed. return to flag pole set to 30 seconds).

How can i prevent this?
Trigger 4 controls the "return of the flag to the pole, should I change something in it's condition field (or something else)?
« Last Edit: 22 Jan 2003, 20:04:16 by LAPD »

Pope_Zog

  • Guest
Re:CTF Problem
« Reply #6 on: 23 Jan 2003, 09:55:36 »
See my reply in the thread Don't Return the Flag!

Pope Zog

LAPD

  • Guest
Re:CTF Problem
« Reply #7 on: 23 Jan 2003, 16:22:12 »
Thanks, working great.  :)

But what about this:
Quote
When someone take the flag he preform the action of taking the flag.
My problem is that if you take the flag and being shot to death while taking the flag and preforming the action, it won't count that the flag was taken and the flag won't come back to the flag pole after 30 seconds.

Can anyone help me?

Thanks Pope Zog for replaying so far.  :)

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:CTF Problem
« Reply #8 on: 23 Jan 2003, 17:35:15 »
#FlagReturn
?(_flag==FlagW):_flag SetFlagSide WEST
?(_flag==FlagE):_flag SetFlagSide EAST  
_flag setFlagOwner objNull
_flagreturnmsg=format["%1 \n has been returned",_flagname]
Hint _flagreturnmsg


This is part of a much larger script t6hat does everything for a ctf,

_flagname had previously been stated further up the script (Which is not shown here)


_flag setFlagOwner objNull

the above line is the statement  that you will be interested in
« Last Edit: 23 Jan 2003, 17:36:30 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

LAPD

  • Guest
Re:CTF Problem
« Reply #9 on: 23 Jan 2003, 20:39:25 »
I didn't undetstand what to do. Where should I put it?

By the way, my flag name is Flag1.

I hope it solves this problem:
Quote
When someone take the flag he preform the action of taking the flag.
My problem is that if you take the flag and being shot to death while taking the flag and preforming the action, it won't count that the flag was taken and the flag won't come back to the flag pole after 30 seconds.

Pope Zog helped me with the problem that if someone take the flag from a dead body the flag won't come back to the pole after a few seconds. My problem now is that right when you take the flag from the flagpole and being shot to death while preforming the action of taking the flag, it won't count that the flag was taken and the flag will stay with the dead body and won't come back to the flag pole. How can i fix this?

Stix

  • Guest
Re:CTF Problem
« Reply #10 on: 24 Jan 2003, 23:56:21 »
The problem i found with Karillions CTF system was

When a friendly player takes the flag from a dead flag runner, he cant score with it

This is the script I use, could somebody point me in the right direction for a fix pleaseThis comes with other supported scripts  but the problem is within this one somewhere


ew ew where can i get Kars CTF system?

Pope_Zog

  • Guest
Re:CTF Problem
« Reply #11 on: 25 Jan 2003, 11:06:57 »
> [...] right when you take the flag from the flagpole and being shot to death [...] the flag will stay with the dead body and won't come back to the flag pole.

Sorry to disappoint you, LAPD, but no matter how many times I replicate this situation, the guy who started taking the flag ends up with it on his corpse, and the flag always returns to the flagpole after the 30 seconds. (I don't know if I should use a :( or :) here ;))

Pope Zog

LAPD

  • Guest
Re:CTF Problem
« Reply #12 on: 25 Jan 2003, 16:50:39 »
that's exactly the problem.
He is shot to death while profrming the action and when he is dead it dosen't count that he took the flag. Also, the flag dosen't appear on his corpse, just when you get close to the corpse you can see the action "take flag", but you can't see it.

If you can make a trigger or something that says that the flag wasn't taken and someone died while trying taking the flag it will be good, but I don't think it's possible  :'(.

If it was supposed to be normal when this happends so i don't know what to do, it ain't normal in my mission.

I played the FLAGFIGHT3 map and when someone die there while taking the flag there is just the sound of taking the flag but it dosen't say "***** has the flag".
I wish I knew how to do that.

LAPD

  • Guest
Re:CTF Problem
« Reply #13 on: 26 Jan 2003, 21:12:53 »
Well, I found out that the flag does appear on the corpse, but it still dosen't return to the flag pole, since it dosen't count that the flag was taken.

Here is my trigger 3, which supposed to count that the flag was taken:
Quote
X axis: 2500    Y axis : 2500
Activation: Anybody, Repeatedly, Present

Condition: (!FlagTaken AND flagowner Flag1 in List PlayersList) OR (FlagTaken AND flagowner Flag1 in List PlayersList AND FlagOwner Flag1 != OwnerR)

On Activation: OwnerR = FlagOwner Flag1; FlagTaken = True; TitleText [ Format ["%1 has the flag!", Name OwnerR], "PLAIN DOWN"];

I guess it dosen't count it when you die while prefirmint the action of taking the flag, look if I can add something to the condition field or something else.

Hope this helps  :)

Sol Fire

  • Guest
Re:CTF Problem
« Reply #14 on: 27 Jan 2003, 06:23:02 »
I was following the CTF tutorial by Backoff.

from what i read of that Tutorial it isnt CTF it is Flag Fight.. for those of you confusing CTF with Flag Fight...

Flag fight involves no teams free for all action for 1 flag.. Team Flag Figh is a team based Flag Fight for one flag

Capture The Flag involves 2 (maybe more) teams who attempt to take the Enemy flag while protecting their own

Example.. im US.. your Russia.. i guard US flag and try to take Russia you Guard Russia and try to take US...

the only thing simular in my oppinion between CTF and Flag Fight is people fighting for flags

i hope the Tutorials called CTF but arnt CTF are fixed soon so people dont get confused and end up having a messed up mission trying to use 2 tutorials they thought were CTF bu one turns out to be Flag Fight not CTF... no offense to anyone and i know the Tutorials are damn good(i use them all myself) but for the sake of the Newbie's to OFP Editing.. it will save a lot of questions not getting ansewered because one person asks about CTF but is really using Flag Fight and the people trying to help are trying to fix a CTF problem not Flag Fight

Thank you :)