of     1   

KoopaMapMaker2
#23865Saturday, April 21, 2007 6:18 PM GMT

Hio! So, as you can see this is all about scripting! So, i obviously have many many questions when it comes down to scripting, as you all know.. lol. So lets get this party started! First off, i am trying to make a custom LB(LeaderBoard) This leaderboard will eventually and hopefully connecting in with the Teams set up. I havent gotten that far yet... ya, i know... So, heres the script, with the thoughts after it: print("BattleFront2SpaceMapLeaderBoardActivatedCommander") function onPlayerEntered(newPlayer) local stats = Instance.new("IntValue") stats.Name = "leaderstats" local mins = Instance.new("IntValue") mins.Name = "Time" mins.Value = 15 local Point = Instance.new("IntValue") Point.Name = "Point" Point.Value = 0 local Round = Instance.new("IntValue") Round.Name = "Round" Round.Value = 0 mins.Parent = stats Point.Parent = stats Round.Parent = stats while true do if newPlayer.Character ~= nil then break end wait(5) end local humanoid = newPlayer.Character.Humanoid stats.Parent = newPlayer end while true do wait(60) mins.Value = mins.Value - 1 if mins.Value == 0 then print("game over") end end game.Players.ChildAdded:connect(onPlayerEntered) So, anyways its very basic and incomplete at the moment, i am going to add more later... but the problem is the LB never shows up... it just has my name under the player list, and the values dont come up. So, my question is why? I believe i have followed most of all the steps that the other ones do. I have been using other LBs to base mines off of... isnt working obviously. So, thats problem number 1, here is number 2. I am trying to make a detonation bomb. This could be very fun, very fun indeed. So, to start it off i tried moving all of the contents fromt he bomb script into the plantbomb script... not sure if that was a good idea... So, i did that then started to change somethings around, so here is the current script for it: print("Bomb hopper script loaded") bin = script.Parent bombScript = script.Parent.Bomb currentColor = 1 colors = {26, 21} ticksound = Instance.new("Sound") ticksound.SoundId = "rbxasset://sounds\\clickfast.wav" ticksound.Parent = script.Parent function blowUp() local sound = Instance.new("Sound") sound.SoundId = "rbxasset://sounds\\Rocket shot.wav" sound.Parent = script.Parent sound.Volume = 1 sound:play() explosion = Instance.new("Explosion") explosion.BlastRadius = 12 explosion.BlastPressure = 1000000 -- these are really wussy units -- find instigator tag local creator = script.Parent:findFirstChild("creator") if creator ~= nil then explosion.Hit:connect(function(part, distance) onPlayerBlownUp(part, distance, creator) end) end explosion.Position = script.Parent.Position explosion.Parent = game.Workspace script.Parent.Transparency = 1 end function onPlayerBlownUp(part, distance, creator) if part.Name == "Head" then local humanoid = part.Parent:findFirstChild("Humanoid") tagHumanoid(humanoid, creator) end end function tagHumanoid(humanoid, creator) -- tag does not need to expire iff all explosions lethal if creator ~= nil then local new_tag = creator:clone() new_tag.Parent = humanoid end end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end function plant() local bomb = Instance.new("Part") local spawnPos = game.Players.LocalPlayer.Character.PrimaryPart.Position bomb.Position = Vector3.new(spawnPos.x, spawnPos.y+3, spawnPos.z) bomb.Size = Vector3.new(2,2,2) bomb.BrickColor = BrickColor.new(21) bomb.Shape = 0 bomb.BottomSurface = 0 bomb.TopSurface = 0 bomb.Reflectance = 1 bomb.Name = "TimeBomb" bomb.Locked = true local creator_tag = Instance.new("ObjectValue") creator_tag.Value = game.Players.LocalPlayer creator_tag.Name = "creator" creator_tag.Parent = bomb bomb.Parent = game.Workspace local new_script = bombScript:clone() new_script.Disabled = false new_script.Parent = bomb end detonation = false enabled = true function onButton1Down(mouse) if not enabled and detonation == false then return end enabled = false mouse.Icon = "rbxasset://textures\\GunWaitCursor.png" plant() ticksound:play() wait(1) mouse.Icon = "rbxasset://textures\\ArrowCursor.png" detonation = true if detonation == true then function onButton2Down(mouse) wait(0.1) blowUp() end end wait(1) mouse.Icon = "rbxasset://textures\\GunCursor.png" enabled = true and detonation == false end function onSelected(mouse) print("bomb selected") mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end wait(2) bombScript:remove() bin.Selected:connect(onSelected) Yes, i know its big when its all put together... I did that because i thought, that i would be able to set up a second onMouseblahblah function and i would need to blow script in here to create the explosion... I wanted to make it so that if you would click on mouse button1 then the bomb would appear, the bomb wouldnt do anything untill you clicked on the mouse button again and then the bomb would detonate. Obviously, if you look, i am trying to set it up so if you click mouse button number 2... I did that instead of mouse button 1 because i always get confused when trying to make two functions of the same type in one script. I was going to try and make that for the mouse button 1 again after i completed the script. So, now to the problem of the script. It never works, i click and nothing happens... i was wondering if someone could point me in the right direction though... Seeing as how everything i do never works, but it never says there is a error. Koopa
Telamon
#23948Sunday, April 22, 2007 12:35 AM GMT

Hey Koopa - your first script looks good. If you put up a test map with that script in it, I'll take a quick look at it and see if I can figure out what is wrong. Your 2nd script is much more complicated - I need to think of the best way to accomplish what you are trying. It's tricky because after you lay a bomb, the bomb wants to listen to further mouse input, which is hard.
KoopaMapMaker2
#24168Sunday, April 22, 2007 7:02 PM GMT

[ Content Deleted ]
pikachu123
#24262Monday, April 23, 2007 12:29 AM GMT

Uhhhhhhhhhhhhhhhhhhhhhhh.......................... WHAT?!
zeraki
#24530Tuesday, April 24, 2007 11:06 PM GMT

ow my head...
Anaminus
Top 100 Poster
#24541Tuesday, April 24, 2007 11:19 PM GMT

Lol, this is advanced scripting. I can't even figure it out... Best just to let it be. ?-Anaminus-?
Spyro
Top 100 Poster
#25188Saturday, April 28, 2007 2:55 AM GMT

Scripting is soooo complicated! I can't even figure out how to make something regenerate!
stang90
#25191Saturday, April 28, 2007 3:16 AM GMT

what i think i got is its a bomb that blows up,then gose to spawn point and blows up again?
HermioneGranger
#25517Sunday, April 29, 2007 8:05 PM GMT

OOOOOOOOOOOOOOOOOOOOOOOOOWWWWWWWWWWWWWWWW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
pikachu123
#25563Sunday, April 29, 2007 10:05 PM GMT

I'm STILL trying to make heads or tails of this script!!!!!!!!!!!
RokinRonan
#80011123Saturday, October 13, 2012 2:59 PM GMT

Interesting script.. >ƒяєє вαcσи cσмєs ὠìтн тнìs ρσsт<
BlazeXBeast
#80012766Saturday, October 13, 2012 3:24 PM GMT

Telamon posted cool thanks for the tips guys
epichris
#80110686Sunday, October 14, 2012 8:01 PM GMT

My brain hurts just for trying that script.
JohnBlockington
#124383394Wednesday, January 29, 2014 9:48 PM GMT

This is old...Anaminus couldn't figure it out OLD BUMP

    of     1