tottiJoin Date: 2006-11-02 Post Count: 2684 |
I have a partial script but I think that I need more to it. Any help would be appriciated greatly. If u need me to post the script I have I will. Thanx Totti |
|
RombomTop 100 PosterJoin Date: 2006-12-11 Post Count: 4347 |
Post it. |
|
tottiJoin Date: 2006-11-02 Post Count: 2684 |
k |
|
tottiJoin Date: 2006-11-02 Post Count: 2684 |
print("Totti's CTF Game!")
redflag=script.Parent.RedFlag
blueflag=script.Parent.BlueFlag
rfpole=redflag.Pole
bfpole=blueflag.Pole
rfpos=rfpole.Position
bfpos=bfpole.Position
red_score=game.Workspace.RedScore
blue_score=game.Workspace.BlueScore
hasred=game.Workspace.HasRed
hasblue=game.Workspace.HasBlue
hold_red=false
hold_blue=false
--CAPTURE FLAG
function onTouchedRed(part)
if(hold_red==false) then
local h = part.Parent:findFirstChild("Humanoid")
local has = game.Workspace.HasRed
if (h~=nil and has.Value=="") then
local team = h:findFirstChild("CTFTag")
if (team~=nil ) then
hold_red=true
local msgtext = ""
local showmsg = false
if (team.Value==0) then --THIS IS RED
local flagtag = h:findFirstChild("FlagHolder")
if (flagtag~=nil) then
showmsg = true
red_score.Value = red_score.Value + 1
flagtag:remove()
hasblue.Value=""
bfpole.CanCollide=true
bfpole.Transparency = 0
blueflag.Cloth.CanCollide=true
blueflag.Cloth.Transparency = 0
msgtext = "RED SCORED! RED: "..red_score.Value.." to Blue: "..blue_score.Value
end
end
if (team.Value==1) then --THIS IS BLUE
local flagtag=Instance.new("IntValue")
flagtag.Name = "FlagHolder"
flagtag.Value = 1
flagtag.Parent = h
hasred.Value = h.Parent.Name
rfpole.CanCollide=false
rfpole.Transparency = 0.5
redflag.Cloth.CanCollide=false
redflag.Cloth.Transparency = 0.5
--TODO: Show that they own it
msgtext = h.Parent.Name.." CAPTURED RED FLAG!"
showmsg=true
end
if (showmsg==true) then
message = Instance.new("Message")
message.Text = msgtext
message.Parent = game.Workspace
wait(1)
message.Parent = nil
end
wait(1)
hold_red=false
end
end
end
end
function onTouchedBlue(part)
local has = game.Workspace.HasBlue
if(hold_blue==false and has.Value=="") then
local h = part.Parent:findFirstChild("Humanoid")
if (h~=nil) then
local team = h:findFirstChild("CTFTag")
if (team~=nil) then
hold_blue=true
local msgtext = ""
local showmsg = false
if (team.Value==1) then --THIS IS BLUE
local flagtag = h:findFirstChild("FlagHolder")
if (flagtag~=nil) then
showmsg = true
blue_score.Value = blue_score.Value + 1
flagtag:remove()
hasred.Value = ""
rfpole.CanCollide=true
rfpole.Transparency = 0.0
redflag.Cloth.CanCollide=true
redflag.Cloth.Transparency = 0.0
msgtext = "BLUE SCORED! RED: "..red_score.Value.." to Blue: "..blue_score.Value
end
end
if (team.Value==0) then --THIS IS RED
local flagtag=Instance.new("IntValue")
flagtag.Name = "FlagHolder"
flagtag.Value = 1
flagtag.Parent = h
hasblue.Value = h.Parent.Name
bfpole.CanCollide=false
bfpole.Transparency = 0.5
blueflag.Cloth.CanCollide=false
blueflag.Cloth.Transparency = 0.5
--TODO: Show that they own it
msgtext = h.Parent.Name.." CAPTURED BLUE FLAG!"
showmsg=true
end
if (showmsg==true) then
message = Instance.new("Message")
message.Text = msgtext
message.Parent = game.Workspace
wait(1)
message.Parent = nil
end
wait(1)
hold_blue=false
end
end
end
end
rfpole.Touched:connect(onTouchedRed)
bfpole.Touched:connect(onTouchedBlue) |
|
tottiJoin Date: 2006-11-02 Post Count: 2684 |
It doesn't wwork by itself u need teams and flag scripts and other stuff I think... |
|
koopaJoin Date: 2006-11-07 Post Count: 1028 |
Yes, i belive you need his other scripts to go with that. Maybe not, but thats what i think.
Koopa |
|
tottiJoin Date: 2006-11-02 Post Count: 2684 |
yah unfortunately i don't have his other scripts |
|
koopaJoin Date: 2006-11-07 Post Count: 1028 |
I could possibly give them to you.
Koopa |
|
tottiJoin Date: 2006-11-02 Post Count: 2684 |
that would possibly be cool but message me them please if u could possibly give them to me lol |
|
Dark501Join Date: 2007-02-08 Post Count: 116 |
just copy paste the reed flag script on the red flag and the blue on the script |
|
tottiJoin Date: 2006-11-02 Post Count: 2684 |
I dunno if i have all those scripts |
|
jcs810Join Date: 2013-06-20 Post Count: 24726 |
11 lol still a long time secret forum
JOIN MY PRIMARY PEOPLE NOWW |
|
jcs810Join Date: 2013-06-20 Post Count: 24726 |
12 lol still a long time secret forum
JOIN MY PRIMARY PEOPLE NOWW |
|
jcs810Join Date: 2013-06-20 Post Count: 24726 |
13 lol still a long time secret forum
JOIN MY PRIMARY PEOPLE NOWW |
|
jcs810Join Date: 2013-06-20 Post Count: 24726 |
15 lol still a long time secret forum
JOIN MY PRIMARY PEOPLE NOWW |
|
jcs810Join Date: 2013-06-20 Post Count: 24726 |
16 lol still a long time secret forum
JOIN MY PRIMARY PEOPLE NOWW |
|
jcs810Join Date: 2013-06-20 Post Count: 24726 |
17 lol still a long time secret forum
JOIN MY PRIMARY PEOPLE NOWW |
|
jcs810Join Date: 2013-06-20 Post Count: 24726 |
18 lol still a long time secret forum
JOIN MY PRIMARY PEOPLE NOWW |
|
jcs810Join Date: 2013-06-20 Post Count: 24726 |
19 lol still a long time secret forum
JOIN MY PRIMARY PEOPLE NOWW |
|
jcs810Join Date: 2013-06-20 Post Count: 24726 |
20 lol still a long time secret forum
JOIN MY PRIMARY PEOPLE NOWW |
|
jcs810Join Date: 2013-06-20 Post Count: 24726 |
21 lol still a long time secret forum
JOIN MY PRIMARY PEOPLE NOWW |
|
jcs810Join Date: 2013-06-20 Post Count: 24726 |
22 lol still a long time secret forum
JOIN MY PRIMARY PEOPLE NOWW |
|
jcs810Join Date: 2013-06-20 Post Count: 24726 |
23 lol still a long time secret forum
JOIN MY PRIMARY PEOPLE NOWW |
|
jcs810Join Date: 2013-06-20 Post Count: 24726 |
24 lol still a long time secret forum
JOIN MY PRIMARY PEOPLE NOWW |
|
jcs810Join Date: 2013-06-20 Post Count: 24726 |
25 lol still a long time secret forum
JOIN MY PRIMARY PEOPLE NOWW |
|