|
Hio! Its been a while now since i have asked for some help on the forums... So, just thought i would start doing it again. =)
No, actually that isnt the reason. So, here my problem. I have been trying to send a message to the people that will be playing in my new game. Obviously its not quite a normal message... otherwise i wouldnt be having trouble with it.
In this message, i want it to say the winning teams score. Thats basically it. Now, for some reason i cant get it to work... So, here is a part of my script, so you can see how i have it setted up.
while true do
wait(120)
local message = Instance.new("Message")
message.Text = "4 minutes remaning!"
message.Parent = game.Workspace
wait(4)
message.Parent = nil
wait(0.01)
message.Text = ("Red score:", redv, "Blue score:", bluev)
message.Parent = game.Workspace
wait(4)
message.Parent = nil
end
Now, the "redv" and "bluev" just stand for the red team's value and the blue team's value. Now, when i test this out it doesnt work, it doesnt even show the first message. So, i also tried this, since i saw it somewhere...
while true do
wait(120)
local message = Instance.new("Message")
message.Text = "4 minutes remaning!"
message.Parent = game.Workspace
wait(4)
message.Parent = nil
wait(0.01)
message.Text = string.format("Red score:", redv, "Blue score:", bluev)
message.Parent = game.Workspace
wait(4)
message.Parent = nil
end
I still dont get any errors, and this time it just shows the first message and part of the second one. All it shows for the second message is "Red score:", and nothing else. =(
So, i have been looking around at some of Telamon's places, like Glass Houses and the old christmas place. These places both have similar things as to what i want to do. So, i tried to model part of this script on those.
Im not really sure as to where my problem is, and any help would be great. =)
Koopa
|
|
SpyroTop 100 PosterJoin Date: 2006-10-04 Post Count: 346 |
Maybe you could ask StealthPilot or miked. They have these in their places. |
|
RombomTop 100 PosterJoin Date: 2006-12-11 Post Count: 4347 |
Telling him who to ask is not really too much help Spyro. It's basiclly spam. |
|
|
Eh... That would be why i posted it here. This way, anyone that knows the answer can put it up, or anyone that has a idea about it.
Putting it up in the forums also allows people to see some stuff on scripting. Which could be helpfull to some.
Koopa |
|
RombomTop 100 PosterJoin Date: 2006-12-11 Post Count: 4347 |
Yeah, but I am starting to get sick of people reading threads and then just posting "idk what 2 do. ask sum1 els."
People, If you don't have anything useful to say outside the off-topic forum, don't post at all! |
|
stang90Join Date: 2006-09-03 Post Count: 5633 |
and i'm gettin tired of you complaining about other people |
|
RombomTop 100 PosterJoin Date: 2006-12-11 Post Count: 4347 |
Who's complaining about other people now? :P |
|
stang90Join Date: 2006-09-03 Post Count: 5633 |
o ya, you think you funny. tobad that little comentary dosent help ya |
|
RombomTop 100 PosterJoin Date: 2006-12-11 Post Count: 4347 |
How dosen't it help me, hmm?
|
|
stang90Join Date: 2006-09-03 Post Count: 5633 |
well your not exactly makein your look good bye spamin even more.
and dont give me any crud about "well you doin it to haha" and junk because i'm only postin cause if i dont say anything, youd think i was chikin and i kenw you wer right but you not so can we pease stop this |
|
RombomTop 100 PosterJoin Date: 2006-12-11 Post Count: 4347 |
So your saying it should be okay for people to post pointless messages when OTHER people are asking for help? (and I am sure they would want useful help) |
|
stang90Join Date: 2006-09-03 Post Count: 5633 |
i didnt say that. i think its pointless to but do you have to point it out? |
|
RombomTop 100 PosterJoin Date: 2006-12-11 Post Count: 4347 |
Yes, I do!
If not pointed out, the people who do this will think its okay and will CONTINUE doing it.
|
|
mikedJoin Date: 2006-11-15 Post Count: 430 |
OK firstly Ill just make a small change, your first script kept changing the parent of the message when it did not need to.
As for building a string, it took me about a month to figure out how (hard to find anything about it anywhere) and when I did it was by accident. Its really simple but rarely found.
Two full-stops ".." in the middle is all you need to join two different strings or integers together.
message.Text = "Red score: " .. redv .. " Blue score: " .. bluev
Your final script goes like this (brackets arent needed but make it neater):
while true do
wait(120)
local message = Instance.new("Message")
message.Parent = game.Workspace
message.Text = "4 minutes remaning!"
wait(4)
message.Text = ("Red score: " .. redv .. " Blue score: " .. bluev)
wait(4)
message.Parent = nil
end |
|
koopaJoin Date: 2006-11-07 Post Count: 1028 |
Thanks miked!
This problem was getting on my nerves, big time. Ill go test this out in my place as soon as i eat my lunch... near death of starvation.
Thanks-a-ton!
Koopa |
|
stang90Join Date: 2006-09-03 Post Count: 5633 |
mikeds like a god |
|
Stealth PilotTop 100 PosterJoin Date: 2006-09-10 Post Count: 2425 |
Yeah, I knew that. Yeah, I'm still cool right? Right? Yeah, I'm cool...
Lol! But yeah, just do as Miked brang out. For some reason, going like "Red's Score: ", redv doesn't work. I think it used to work, because I saw some of this technique in action at Telamon's Christmas map. Point is, not anymore.
Pilot |
|
koopaJoin Date: 2006-11-07 Post Count: 1028 |
Yesa, your still cool Pilot! =)
Thanks miked, it works now. Finally sends the message completely.
I have encountered another small problem actually, and was wondering if someone had a idea on how to get around this. Since the message works now, i have noticed that it only sends out the number 0 for redv, and bluev. The starting value is 0 for redv and bluev. It increases after a certian even has taken place. Even after the certian event has taken place and the value has gone up, it still sends out 0.
I was thinking that maybe this has to do with when i said that bluev and redv = somthing. Like redv = game.Workspace.SGMP.Red.Value and then the script would go into the while true do below that.
I thought that might be the problem since i found out something similar like that in a regen script i made. =
So, if i didnt confuse you and you think you got a idea, please tell. =)
Koopa |
|
are42Top 100 PosterJoin Date: 2007-01-24 Post Count: 155 |
wgat isent point anymore!!!! so what si it I have on Space Cruise???? |
|
|
Eh, you have something like this on space cruise?
Koopa |
|
Stealth PilotTop 100 PosterJoin Date: 2006-09-10 Post Count: 2425 |
Do you mean like a Command Post? If you really want them, I'm gonna publish them as a model anyway, so if you want them... =) |
|
AnaminusTop 100 PosterJoin Date: 2006-11-29 Post Count: 5945 |
I thi kI know what the problem is, try this:
redv = game.Workspace.SGMP.Red
Then in the while true do, you do
redv.Value = yada yada yada.
Yeah, I think that should work. :)
?-Anaminus-? |
|
|
|