MrGTAmodsgerman Posted February 27, 2014 Posted February 27, 2014 Hello guys, i wanna make a extrem realistic night effect for my RPG Server but i got a problem i wanna set the skycolor with a timer to black and this not directly because it have to be going slowly to black at 22 o clock it have to be complete to a black sky and at 4 o clock morning it have to be going slowly to the normal sky color. But i poste this problem in other forums but nobody can help me with it the problem is with my script: the color of the sky didnt going to black only gray and not the full skyarea. I got 0 errors My script: setTimer (function() local hour = getTime().hour if hour >= 22 or hour <= 4 then setSkyGradient( 0 , 0 , 0 , 0 , 0 , 0 ) else resetSkyGradient() end end, 300000, 0) if is this fix it i wanna add a contrast dark effect to make the houses cars and all the things with the same brightness but how?? I hope anybody can help me with it But sorry for my bad english I poste the Meta file: "MrGTAmodsgerman" type="script" name="Realistic Nightsky" version="1.0.0" />
Castillo Posted February 27, 2014 Posted February 27, 2014 getTime returns the game time, and it doesn't return a table like getRealTime. The result is: local hour, minute = getTime ( )
MrGTAmodsgerman Posted February 28, 2014 Author Posted February 28, 2014 Thanks but now at 22:04 the sky is black, at 22:03 is the sky dark blue but what is that? the skycolor has to be change with the time to 22:00 on 21:59 is the sky very dark gray u know what i mean? like in reallife, it comes darker darker darker and then at 4:00 it change with the timer to the normal color as resetSkyGradient You know? i add good effects now: setTimer (function() local hour, minute = getTime ( ) if hour >= 22 or hour <= 4 then setSkyGradient(0, 0, 0, 5, 5, 5) setFarClipDistance(80) else resetSkyGradient() resetFarClipDistance() end end, 300000, 0) EDIT: I set the time in the admin panel to 3:58 and get this What is that? how i can fix that, it looks good but its to dark i cant drive What is the reason of this effect? At 5:04 the Big Effect turn off
Vanlot Posted February 28, 2014 Posted February 28, 2014 I think that you have to increase the values a bit.
Jesseunit Posted February 28, 2014 Posted February 28, 2014 I made a similar resource a few months ago. https://forum.multitheftauto.com/viewtopic.php?f ... ht#p554785
Moderators Citizen Posted February 28, 2014 Moderators Posted February 28, 2014 I made a similar resource a few months ago.https://forum.multitheftauto.com/viewtopic.php?f ... ht#p554785 Sounds nice but can you add screenshots from a reliable image hoster please ?
cheez3d Posted February 28, 2014 Posted February 28, 2014 You can use interpolateBetween for a nice smooth effect when changing sky color.
MrGTAmodsgerman Posted February 28, 2014 Author Posted February 28, 2014 I made a similar resource a few months ago.https://forum.multitheftauto.com/viewtopic.php?f ... ht#p554785 I combinate your script with mine days ago but it didnt fix that sky change problem but How i can fix that stupid bug and set down the extrem darkness it looks like a horror game LOL
MrGTAmodsgerman Posted March 1, 2014 Author Posted March 1, 2014 You can use interpolateBetween for a nice smooth effect when changing sky color. like this? setTimer (function() local hour, minute = getTime ( ) if hour >= 22 or hour <= 4 then interpolateBetween setSkyGradient(0, 0, 0, 5, 5, 5) setFarClipDistance(80) else resetSkyGradient() resetFarClipDistance() end end, 300000, 0)
cheez3d Posted March 1, 2014 Posted March 1, 2014 Did you read the page abut the function? I don't think so. https://wiki.multitheftauto.com/wiki/interpolateBetween
glowdemon1 Posted March 1, 2014 Posted March 1, 2014 I made a similar resource a few months ago.https://forum.multitheftauto.com/viewtopic.php?f ... ht#p554785 I combinate your script with mine days ago but it didnt fix that sky change problem but How i can fix that stupid bug and set down the extrem darkness it looks like a horror game LOL Try changing from a :16 res to a :32 res, might help.
MrGTAmodsgerman Posted March 1, 2014 Author Posted March 1, 2014 Did you read the page abut the function? I don't think so.https://wiki.multitheftauto.com/wiki/interpolateBetween I read the function but i dint need a postion coordinates
Karuzo Posted March 1, 2014 Posted March 1, 2014 x1, y1, z1: 3D coordinates of source vector/valuex2, y2, z2: 3D coordinates of target vector/value They were not position coordinates.
Moderators Citizen Posted March 1, 2014 Moderators Posted March 1, 2014 Did you read the page abut the function? I don't think so.https://wiki.multitheftauto.com/wiki/interpolateBetween I read the function but i dint need a postion coordinates It's just some maths, you can give the starting gradient and the ending one (of course you need to use 2 interpolate between since you have 6 values to fade nicely). The function doesn't care if the values you are giving will be then used for sky gradient or to set the position of an object or a gui/dx element. They are just numbers. That function will just go from the start numbers to the ending ones using the easing function you want.
MrGTAmodsgerman Posted March 1, 2014 Author Posted March 1, 2014 x1, y1, z1: 3D coordinates of source vector/valuex2, y2, z2: 3D coordinates of target vector/value They were not position coordinates. Hey i see you hear Kollegah, you speak german. Please tell me what i have to do in a private message
MrGTAmodsgerman Posted March 10, 2014 Author Posted March 10, 2014 Did you read the page abut the function? I don't think so.https://wiki.multitheftauto.com/wiki/interpolateBetween I read the function but i dint need a postion coordinates It's just some maths, you can give the starting gradient and the ending one (of course you need to use 2 interpolate between since you have 6 values to fade nicely). The function doesn't care if the values you are giving will be then used for sky gradient or to set the position of an object or a gui/dx element. They are just numbers. That function will just go from the start numbers to the ending ones using the easing function you want. Where i can find the coordination of the sky? it is possible to import simple a timycyc.dat file?
Moderators Citizen Posted March 10, 2014 Moderators Posted March 10, 2014 Where i can find the coordination of the sky? it is possible to import simple a timycyc.dat file? There is no coordinate to get ... Please read again my post. Feel free to use google translate if english isn't your native language.
MrGTAmodsgerman Posted March 10, 2014 Author Posted March 10, 2014 Where i can find the coordination of the sky? it is possible to import simple a timycyc.dat file? There is no coordinate to get ... Please read again my post. Feel free to use google translate if english isn't your native language. Ah i have to set the sky with the easing function it automaticly put a start and a ending in the sky right?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now