Main Search
Delta Corp Forum Index
 
 
FAQ Members Groups Profile Private Messages

Important Notice: We regret to inform you that our free phpBB forum hosting service will be discontinued by the end of June 30, 2024. If you wish to migrate to our paid hosting service, please contact [email protected].
Capturable Spawns?

 
Post new topic   Reply to topic    Delta Corp Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Akhenderson
Robloxian Shyguy


Joined: 30 Mar 2008
Posts: 209
Location: Corneria

PostPosted: Wed Jul 02, 2008 2:20 pm    Post subject: Capturable Spawns? Reply with quote

Can anyone get me a capturable spawn, where you stand on the spawn
for 10 seconds you get the spawn for your team?

it's still for my Elemental Place.
_________________
My INT score was lowered just by
being near those noobs who build
pointless places that instantly get
popular.
Back to top
View user's profile Send private message Visit poster's website
ultrameep
Newbie


Joined: 01 Jul 2008
Posts: 4

PostPosted: Thu Jul 03, 2008 11:18 pm    Post subject: Reply with quote

probably not the best, but it works

---------------------------------------------------
local brick = script.Parent -- the brick it checks
local precision = 0.5 -- the lower the better, however it will lag more with a lower number
time = 10
function blah(player)
for i = 1,time/precision do
wait(precision)
if Inside[player.Name] ~= true then return end
end
script.Parent.TeamColor = player.TeamColor
script.Parent.BrickColor = player.TeamColor
end
Inside = {}
function isIn(part1,part2)
if part1.Position.x >= part2.Position.x - (part2.Size.x / 2) and part1.Position.x <= part2.Position.x + (part2.Size.x / 2) then
if part1.Position.y >= part2.Position.y + (part2.Size.y / 2) and part1.Position.y <= part2.Position.y + (part2.Size.y / 2) + 5 then
if part1.Position.z >= part2.Position.z - (part2.Size.z / 2) and part1.Position.z <= part2.Position.z + (part2.Size.z / 2) then
return true
end
end
end
return false
end

function onPlayerRemoving(player)
if Inside[player.Name] then
Inside[player.Name] = nil
end
end

game.Players.PlayerRemoving:connect(onPlayerRemoved)

while true do
local z = game.Players:GetChildren()
for i = 1,#z do
if z[i].Character then
if z[i].Character:findFirstChild("Torso") then
if isIn(z[i].Character.Torso,brick) then
if not Inside[z[i].Name] then
coroutine.resume(coroutine.create(blah),z[i])
Inside[z[i].Name] = true
end
else
if Inside[z[i].Name] then
Inside[z[i].Name] = nil
end
end
end
end
end
wait(precision)
end
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Delta Corp Forum Index -> Script Requests All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Back to Top              
Jenova Template © digital-delusion.com
Powered by phpBB © 2001, 2002 phpBB Group



For Support - http://forums.BizHat.com

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!