Game Dev Contest
Join in on the Game Development contest with over $300 in prizes!
Banner Creation Contest!
Help the community out by creating your own version of the banner, and potentially having that as the main banner!
Resources
Check out our resources :D
Upgrade your account
Help out the community, and keep the website running and fully up to date by donating! :D

Need help (LTN time engine, get weather to match the month)

GO TO ADMIN PANEL > ADD-ONS AND INSTALL ABSTRACT SIDEBAR TO SEE FORUMS AND SIDEBAR
Status
Not open for further replies.

KaineOfElderon

Towns Guard
Joined
Feb 21, 2017
Messages
93
Points
87
RM Skill
Musician
I am trying to get an event to work via conditional branching, but I want it to only activate if certain parts of a script are true.

Mainly the LTN time engine, trying to get weather to match the months(like it should snow between December and Feburary) and rain so on and so on.

Just seems everything I do try fails. Tried coding it or modifying but I am not good on coding and seemed a dead end...almost ready to go the old school method of making a time and weather via common events

Any ideas to prevent that?
 

Dalton Sayre

Towns Guard
Joined
Feb 26, 2016
Messages
85
Points
58
RM Skill
Designer
I haven't found a better solution than common events. I built my own time system from seconds to years using common events, including screen tint for evening through morning + indoor & cave tints with triggers for lights/torches/candles. I used scripts for a bit, but I encountered less issues by rolling up my sleeves and going old school. Sorry, I know this isn't much help.
 

CT_Bolt

Global Moderator
Staff member
Resource Team
Joined
Nov 12, 2015
Messages
552
Points
248
RM Skill
Programmer
I am trying to get an event to work via conditional branching, but I want it to only activate if certain parts of a script are true.

Mainly the LTN time engine, trying to get weather to match the months(like it should snow between December and Feburary) and rain so on and so on.

Just seems everything I do try fails. Tried coding it or modifying but I am not good on coding and seemed a dead end...almost ready to go the old school method of making a time and weather via common events

Any ideas to prevent that?
Setup the variables right away using a parallel event then enable self switch 'A'
This set's the month to Game Variable #1
upload_2019-1-4_13-27-49.png
Plugin Command:

------------------------------------------

TE Variables static/current Hour Minute Day Week Month Year

------------------------------------------



eg:

# Takes a snapshot of the time, which will always remain the time when you set them.

TE Variables static 1 2 3 4 5 6



# This will always update the variables to be the current time.

TE Variables active 1 2 3 4 5 6



# This will clear the active variables from being updated

TE Variables clear



This plugin command will setup the game time to the variable # you set.

In the example above the hour will go into variable 1 and so on.



variables - is a keyword which lets the plugin know you want to set variables



static or active - the third keyword let's the plugin know you want to get a

timestamp(static) of the current time or you want the variabels to be always updated

(active).



clear - This is a third keyword you can use to clear the active variables, this will

stop the active variables from being updated, until you set the active variables again.

NOTE: The variables will still reflect the time it was when you cleared the active variables.
As described in the help file using the word 'active" instead of "static" means the variable will auto-update to the current month.

Set page 2 to to a blank page with the condition set to self switch 'A' to make sure it only happens once.
upload_2019-1-4_13-37-50.png

To check for the month:
upload_2019-1-4_13-36-13.png

Javascript used to check the variable for the month:
JavaScript:
$gameVariables.value(1) === "December" || $gameVariables.value(1) === "January" || $gameVariables.value(1) === "February"

That should do the trick for ya. (cute)(thumbsup)
Please let me know how it goes. (cool)
 
Last edited:

KaineOfElderon

Towns Guard
Joined
Feb 21, 2017
Messages
93
Points
87
RM Skill
Musician
Thanks CT_Bolt...though since this post I toyed more and then ended up going the old school method...actually got a little more invovled then I had planned, made each season have different times/tints, shop hours and so forth....even made it where the temp is colder at night like it is in real life.....much to the dismay of my wife but my kids loved watching me do it :-)
 

CT_Bolt

Global Moderator
Staff member
Resource Team
Joined
Nov 12, 2015
Messages
552
Points
248
RM Skill
Programmer
Thanks CT_Bolt...though since this post I toyed more and then ended up going the old school method...actually got a little more invovled then I had planned, made each season have different times/tints, shop hours and so forth....even made it where the temp is colder at night like it is in real life.....much to the dismay of my wife but my kids loved watching me do it :-)
Oh cool! No problem, does sound really cool. Glad you've got things working the way you need. (cool)(thumbsup)
The info is there still if you need it later though. (cute)

Happy Game Making! (icecream)

Problem solved. Thread closed.
 
Status
Not open for further replies.
Top