Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hey guys am providing an example file which will Show/Guide you How to create a realtime skybox animation! our objective is to animate texture of skybox respective to time in our pc. instead of changing a texture i have used make visible or invisible action for behaviour if a variable has value do something Download the file and test it. It contains 3 different skyboxes blue skybox,sunset and midnight skybox. blue skybox is the default skybox. To test the app. First set You pc's time to 1AM now test app. Set time to 5PM Now test app. Set time to 6AM test the app.(nothing will change unless its 5PM or 1AM in your pc's clock, because it is the default scene) you will find that how the skyboxes animate according to pc's time. there are also some 2d overlays which will draw realtime CLOCK,DATE,MONTH,YEAR Here is the Code Also: //implemented by Just_in_case. For Non-programmers Just add a new behaviour to your root scene node every few seconds do something and then add a new action Execute javascript and copy paste the above code there. Use variables seconds,minutes,hours,year,date for your scene. for better understanding download the Example file: Download Link:- https://drive.google.com/open?id... Hope the example will help you. You can also animate weather according to month. and can create festivals in your game according to date. for example if it will 25th of December in real world then it will be Christmas in your game too. Thanks! Justin Case |
||||
|
nice could be a live screen saver too if converted |
||||
|
Yeah but that may drain battery faster... anyway who cares about the draining of battery while personalizing themes and wallpapers... |
||||
|
This sounds super! Can the script be somewhat easily changed so that 24 hours translates to one hour (a whole day to pass in one hour)? I am no coder, so who ever that feels for it, is free to come up with a full scripted solution :-) |
||||
|
I can't download it... even i used proxy, can you upload it on other site or something? |
||||
|
@blackwater yes you can use it for "1 hour" to animate the skybox... just change the variable hour to minutes used in the provided ccb file.. for example if you want the skybox to animate after 15 minutes. Assume 15 minutes will be equal to 5:00 clock. so in the provided ccb file click on the day night 2d overlay , goto behaviours. click on the shown behaviour , and choose first action. change variable name from "hours" to "minutes" and set value to 15. now time to test your app.. adjust the time of your pc to anytime which have 15 minutes in its last.. for example 12:15 , 1:15, 2:15 , 3:15 and so eveytime the minutes turns to be fifteen the skybox will change and animate to the provided skybox. you can do the same thing for other 2 actions or can add as a many actions as you want just change the hour variable to minutes and value to you desired value. hope you understand.. @Rolevix sorry that site has been shutted down... here is the updated link to the ccb file... https://drive.google.com/open?id... |
||||
|
@just_in_case: Speaking of time: Thanks a thousand for the detailed explanation! (Got it working, so it will probably make some good use in my project/s)! |
||||
|
This is awesome! I can't code, and was looking for this on the net! Ihave the other day/night cycle but it does not show the time :( Just what I needed for my little town simulation! thanks a million! btw, here is a thank you, download my town ccb file too! https://steamcommunity.com/app/8... |
|