IcyWyvernJoin Date: 2007-06-20 Post Count: 105 |
I've asked MrDoomBringer if this is possible, but he hasn't replied yet. (Because he's offline) While we're waiting, does anyone know about lap systems? For example you cross one of those black and white lines and it says "Lap 2" then you cross it again after going round the racetrack and it says "Lap 3" and so on till it says "Finished!"
The playername IS possible because in mikeds place it says " [playername] has earned 25 points!" Or something like that.
Another thing: I'm trying to modify a plane so it doesn't blow when it hits a wall.
If any of you can help, i would appreciate it greatly. |
|
|
Hey there, I don't understand what you are trying to do with the player name. Certainly it IS possible to print a player's name as a message.
A lap system is very possible to make. You want to make a series of non-Colliding bricks that listen to player's touching them. Once a player has touched all of them, he has "done a lap". You then arrange these bricks in a circle, or however you want to lay out your track.
This is how many (all?) racing games keep track of laps.
I might make one myself, once we get decent vehicles in ROBLOX. |
|
IcyWyvernJoin Date: 2007-06-20 Post Count: 105 |
Hmmm... with the player name, i need it to show when the player finishes the race. The lap system, according to you is possible, but it is so HARD!!!!!!!!! So speaking of which, you can help? |
|
Stealth PilotTop 100 PosterJoin Date: 2006-09-10 Post Count: 2425 |
If you can tag the winner in your script, you can make this in your script:
msg.Text = winner.Name.." has taken first place!"
That's just an example, you gotta do some modifications to actually make that work, but that's the principle of showing how get string values into messages.
>Pilot< |
|
buttladTop 100 PosterJoin Date: 2007-01-15 Post Count: 608 |
Easy,
debounce = false
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil then
local p = game.Players:findFirstChild(h.Parent.Name)
if (debounce == false) then
debounce = true
local points = p.leaderstats.Points
points.Value = points.Value + 25 -- change this if you want
local m = Instance.new("Message")
m.Parent = game.Workspace
m.Text = h.Parent.Name .." got 25 points"
wait(3)
m:remove()
wait(2)
debounce = false
end
end
end
script.Parent.Touched:connect(onTouched) -- Happy B-Day lol |
|
IcyWyvernJoin Date: 2007-06-20 Post Count: 105 |
hmmmmm... |
|
IcyWyvernJoin Date: 2007-06-20 Post Count: 105 |
So thats for winning, and now i need laps... |
|
slosoTop 100 PosterJoin Date: 2007-05-08 Post Count: 634 |
easy! PEice of cake...
get a h.Player.Name brick from the toolbox, transparency 1 and canollide easy now just make it big...I think that should work |
|
IcyWyvernJoin Date: 2007-06-20 Post Count: 105 |
ermmm... the script for laps? |
|
|
isnt it suppose to be
debounce = false
function onTouched(hit)
local h = hit.Parent:findFirstChild("Humanoid")
if h~=nil then
local p = game.Players:findFirstChild(h.Parent.Name)
if (debounce == false) then
debounce = true
local points = p.leaderstats.Points
points.Value = points.Value + 25 -- change this if you want
local m = Instance.new("Message")
m.Parent = game.Workspace
m.Text = h.Parent.Name .." got 25 points"
wait(3)
m:remove()
wait(2)
debounce = false
end
end
end
script.Parent.Touched:connect(onTouched)
cuz this is wut i hav (except for the point thing) |
|
IcyWyvernJoin Date: 2007-06-20 Post Count: 105 |
function killall()
c=game.Players:children()
for i=1, #c do
if c[i].Character then
c[i].Character.Humanoid.Health=0
end
end
end
some_event_here:connect(killall)
-----------------------------------------
This is what miked gave me, its supposed to happen at the end of it when someone finishes all 5 laps. The "some_event_here" is supposed to be when all laps are done, but i just can't figure that out. Sure i tried it once and it crashed.
|
|
burglyTop 100 PosterJoin Date: 2006-08-20 Post Count: 2843 |
how about making a script that uses a value? like when they hit it make a stat leader board and make it do lapvalue+1 or something like thet then put if lap.value=3 then something something
-Burgly |
|
IcyWyvernJoin Date: 2007-06-20 Post Count: 105 |
Problem is I don't know how to add values +1. |
|
burglyTop 100 PosterJoin Date: 2006-08-20 Post Count: 2843 |
how about:
debounce = false
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil then
local p = game.Players:findFirstChild(h.Parent.Name)
if (debounce == false) then
debounce = true
local points = p.leaderstats.laps
laps.Value = laps.Value + 1 -- change this if you want
local m = Instance.new("Message")
m.Parent = game.Workspace
m.Text = h.Parent.Name .." got 1 lap"
wait(3)
m:remove()
wait(2)
debounce = false
end
end
end
script.Parent.Touched:connect(onTouched)
then add something like:
if laps.value=3
then
local m = Instance.new("Message")
m.Parent = game.Workspace
m.Text = h.Parent.Name .." is the wiinner!" |
|
IcyWyvernJoin Date: 2007-06-20 Post Count: 105 |
Phew... some help. Thanks burgly! Now only for the non-explosional plane. |
|
IcyWyvernJoin Date: 2007-06-20 Post Count: 105 |
burgly... it doesn't work. |
|
burglyTop 100 PosterJoin Date: 2006-08-20 Post Count: 2843 |
if laps.value ==3
then
local m = Instance.new("Message")
m.Parent = game.Workspace
m.Text = h.Parent.Name .." is the winner!"
end
I think i was missing the end part.
-Bonito! To the world- |
|
burglyTop 100 PosterJoin Date: 2006-08-20 Post Count: 2843 |
Oh for the plane, take out the script in it that is short and refers to the item "tip".
-Bonito! To the world- |
|
|
mbyae jsut mybae it culod wrok, jsut myabe |
|
bloccoJoin Date: 2008-08-14 Post Count: 29474 |
Dude, WTH? NOW THIS IS GONNA GET LOCKED! Why man? Why did you have to spam? |
|
|
Blocco who are you talking too? |
|
bloccoJoin Date: 2008-08-14 Post Count: 29474 |
Morphmaniac. |
|
|
FoodTestsJoin Date: 2009-05-02 Post Count: 1507 |
I've seen this thread before too. '07 FTW
Nobody else reply bcause this is an OLD thread :P |
|