generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: is at 0?

Previous Thread :: Next Thread 
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
25 Oct 2013 07:47 PM
the value default is 0, and it seems that it will not change, so when the script that gets these values for the fog tries to use it, it sort of make everything invisible, and the values wont change, anyone know whats wrong?

wait()
local function sChange()

wait(1)

if game.Lighting.Current_Map == "Test_Map" then
game.Lighting.Current_Map.FogStartMin.Value = -575
game.Lighting.Current_Map.FogStartMax.Value = -775
game.Lighting.Current_Map.FogEndMax.Value = 775
game.Lighting.Current_Map.FogEndMin.Value = 575

end
end

game.Lighting.Current_Map.Changed:connect(sChange)

When life gives you lemons, Squirt 'em in your eyes. - Drahsid5
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
25 Oct 2013 07:50 PM
I am assuming that Current_Map is a string value. If not, what is it. If it is a string value, this should fix it.


wait()

function sChange()
wait(1)
if game.Lighting.Current_Map.Value == "Test_Map" then
game.Lighting.Current_Map.FogStartMin.Value = -575
game.Lighting.Current_Map.FogStartMax.Value = -775
game.Lighting.Current_Map.FogEndMax.Value = 775
game.Lighting.Current_Map.FogEndMin.Value = 575
end
end
game.Lighting.Current_Map.Changed:connect(sChange)

http://www.roblox.com/My/Groups.aspx?gid=66545
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
25 Oct 2013 07:54 PM
the values are still not changing.

When life gives you lemons, Squirt 'em in your eyes. - Drahsid5
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
25 Oct 2013 07:58 PM
What is Current_Map? A model, string value, frame?

http://www.roblox.com/My/Groups.aspx?gid=66545
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
25 Oct 2013 08:01 PM
It is a string value

When life gives you lemons, Squirt 'em in your eyes. - Drahsid5
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
25 Oct 2013 08:04 PM
What script is changing Current_Map?

http://www.roblox.com/My/Groups.aspx?gid=66545
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
25 Oct 2013 08:06 PM
atm nothing. =p I feel stupid now.

When life gives you lemons, Squirt 'em in your eyes. - Drahsid5
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
25 Oct 2013 08:07 PM
:)

http://www.roblox.com/My/Groups.aspx?gid=66545
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
25 Oct 2013 08:16 PM
now It wont loop properly in the script that changes the fog

femi = game.Lighting.Current_Map.FogEndMin
fema = game.Lighting.Current_Map.FogEndMax
fsmi = game.Lighting.Current_Map.FogStartMax
fsma = game.Lighting.Current_Map.FogStartMax

function UpdateFog(UpdateFog)
game.Lighting.FogEnd = math.random(femi.Value, fema.Value)
game.Lighting.FogEnd = math.random(fsmi.Value, fsma.Value)
wait(1)
UpdateFog()

end

When life gives you lemons, Squirt 'em in your eyes. - Drahsid5
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
25 Oct 2013 08:20 PM
femi = game.Lighting.Current_Map.FogEndMin
fema = game.Lighting.Current_Map.FogEndMax
fsmi = game.Lighting.Current_Map.FogStartMax
fsma = game.Lighting.Current_Map.FogStartMax
function UpdateFog(UpdateFog)
game.Lighting.FogEnd = math.random(femi.Value, fema.Value)
game.Lighting.FogEnd = math.random(fsmi.Value, fsma.Value)
wait(1)
end

UpdateFog()

http://www.roblox.com/My/Groups.aspx?gid=66545
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
25 Oct 2013 08:24 PM
didn't work.
The values did change although the fog didn't.

When life gives you lemons, Squirt 'em in your eyes. - Drahsid5
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
25 Oct 2013 08:26 PM
femi = game.Lighting.Current_Map.FogEndMin
fema = game.Lighting.Current_Map.FogEndMax
fsmi = game.Lighting.Current_Map.FogStartMax
fsma = game.Lighting.Current_Map.FogStartMax

function UpdateFog()
game.Lighting.FogEnd = math.random(femi.Value, fema.Value)
game.Lighting.FogEnd = math.random(fsmi.Value, fsma.Value)
wait(1)
end
UpdateFog()

http://www.roblox.com/My/Groups.aspx?gid=66545
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
25 Oct 2013 08:30 PM
still, nothing.

When life gives you lemons, Squirt 'em in your eyes. - Drahsid5
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
25 Oct 2013 08:31 PM
Oyeah, the output is empty too.

When life gives you lemons, Squirt 'em in your eyes. - Drahsid5
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
25 Oct 2013 08:33 PM
and while true do only works once..

femi = game.Lighting.Current_Map.FogEndMin
fema = game.Lighting.Current_Map.FogEndMax
fsmi = game.Lighting.Current_Map.FogStartMax
fsma = game.Lighting.Current_Map.FogStartMax
while true do
game.Lighting.FogEnd = math.random(femi.Value, fema.Value)
game.Lighting.FogEnd = math.random(fsmi.Value, fsma.Value)
wait(1)
end

When life gives you lemons, Squirt 'em in your eyes. - Drahsid5
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
25 Oct 2013 08:39 PM
What do the four values in Current_Map equal?

http://www.roblox.com/My/Groups.aspx?gid=66545
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
25 Oct 2013 08:45 PM
what the fog will be set too, the min and max for the randomized values.

When life gives you lemons, Squirt 'em in your eyes. - Drahsid5
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
25 Oct 2013 08:59 PM
femi = game.Lighting.Current_Map.FogEndMin
fema = game.Lighting.Current_Map.FogEndMax
fsmi = game.Lighting.Current_Map.FogStartMax
fsma = game.Lighting.Current_Map.FogStartMax

while true do
game.Lighting.FogEnd = math.random(femi.Value, fema.Value)
game.Lighting.FogStart = math.random(fsmi.Value, fsma.Value)
wait(1)
end

http://www.roblox.com/My/Groups.aspx?gid=66545
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
25 Oct 2013 09:07 PM
thanks c:

When life gives you lemons, Squirt 'em in your eyes. - Drahsid5
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
25 Oct 2013 09:16 PM
No Problem. :)

http://www.roblox.com/My/Groups.aspx?gid=66545
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image