AndracoDragons

Villager
Member
Joined
Jan 24, 2013
Messages
17
Reaction score
3
First Language
english
Primarily Uses
RMMV
Would it be possible to add Day/Night capability to this script? I really want a real time clock but i also want day and night feature. also if possible, is there a way to have a switch in there that will activate events that do things like, Turn lights on in houses, closes shops, and cause different types of enemies to come out? I would really appreciate it if it can happen.
 

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
382
First Language
English
Primarily Uses
Take a look at my Advanced Game Time script, it does the day/night thing and has an option to use Real Time.
 

JulianSK

Villager
Member
Joined
May 4, 2013
Messages
28
Reaction score
5
First Language
Portuguese
Primarily Uses
RMMV
Hi there!

I would like to know which commands to use the Khas script call in common events.

For example, to make evening at 18:00 with the command:

s = $ game_map.effect_surface
s.change_color (120,68,68,255,170)

Note: I tried again with the Advanced Game Time, the colors were a bit more intense but still not equal to the light script's command and the day was still half dark, even leaving all values ​​in (0,0,0,0)
 

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
382
First Language
English
Primarily Uses
In a conditional branch, use the script call:


Rtime::hour == 18


and that branch will only be true when the time is 18:00
 

JulianSK

Villager
Member
Joined
May 4, 2013
Messages
28
Reaction score
5
First Language
Portuguese
Primarily Uses
RMMV
I tried the command:



@> Conditional Branch: Script: Rtime :: hour == 23



Followed by the script call:


@>Script: s = $ game_map.effect_surface
s.change_color (120,68,68,255,170)



And got the following error:

semttuloxyp.png

I put only that two commands, will need some switch or self-switch to work? Variable I think not, because the script already fulfills the same role.
 
Last edited by a moderator:

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
382
First Language
English
Primarily Uses
@> Conditional Branch: Script: Rtime :: hour == 23


It looks like you have spaces in between Rtime, ::, and hour. None of that.
 

JulianSK

Villager
Member
Joined
May 4, 2013
Messages
28
Reaction score
5
First Language
Portuguese
Primarily Uses
RMMV
I tried again, but this time I used "RTime::hour == number" and finally works!

The error was in the "T" letter, when put tiny gave the error and when I changed to uppercase, it worked.


Thanks for the help, Vlue. :)

 

 
 

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
382
First Language
English
Primarily Uses
Ah whoops haha, i's always the little things. My bad for using lowercase in the instructions. Glad it's working for you now!
 

JulianSK

Villager
Member
Joined
May 4, 2013
Messages
28
Reaction score
5
First Language
Portuguese
Primarily Uses
RMMV
Hi again Vlue;

I have another question, how to make an NPC appear only at a certain time?
For example, the NPC appears between 8:00 and 12:00, and then disappear?
I searched for tutorials that tell how to make NPCs appearing and disappearing but unfortunately, none teaches about conditional branches based on schedules...
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,006
First Language
Tagalog
Primarily Uses
RMVXA
You can have the first page of the event as an autorun event, then use conditional branches for the time + self-switches to determine which page should actually show...

or you can also use the conditions page only + a variable that saves the current time (if the script doesn't do it right now, you can maybe edit it so that it saves into a game variable the time), first page will have the condition of (variable >= 8, or whatever is equal to 8:00), this page will have the npc shown. Then make a second page that uses the condition (variable > 12 or whatever is equal to 12:00), this page will be the blank one
 
Last edited by a moderator:

JulianSK

Villager
Member
Joined
May 4, 2013
Messages
28
Reaction score
5
First Language
Portuguese
Primarily Uses
RMMV
With two event pages (one with the NPC, and other without graphic) and using the conditional branches, did not work...
With 3 pages, the first being without graphic, the second with the NPC, and the third empty again, and switches, I managed to make it appear at the scheduled time, but it has a problem... At the scheduled time for him disappear, it stays there and only disappears if I "talk" with him.

 

 
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,006
First Language
Tagalog
Primarily Uses
RMVXA
The two pages method does not use conditional branches... It uses the Condition part on the left side of the event page...

btw, this method is already tested and used by me so I'm sure that it works...
 
Last edited by a moderator:

JulianSK

Villager
Member
Joined
May 4, 2013
Messages
28
Reaction score
5
First Language
Portuguese
Primarily Uses
RMMV
I made my event like this:
 

First page

page1rd.png

Second page

page2nh.png

Third page



page3p.png

When I put the second page as "Parallel Process", the NPC appears at the scheduled time, and disappear at another time.
The issue is that if I do this way, I can not put a dialogue, or it is being repeated infinitely.
But if I leave the second page as "Action Button", the NPC disappears only if I talk to him.

Have a way to keep the dialog text and at the same time make NPC disappear at the scheduled time without "touching" him?

 

 
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,006
First Language
Tagalog
Primarily Uses
RMVXA
Use the two pages method, because the three pages method doesn't update in real time...

btw, when doing event specific switches, better use self switches I guess...
 
Last edited by a moderator:

Latest Threads

Latest Profile Posts

2021 has been the runner-up for the worst year of my life. 2015 may take that title, but '21 is pushing it. Excuses really don't justify how much of a jerk I've been this year to a lot of people.

I'm sorry. I don't intend to be a jerk forever, but I'd rather back up my intent with actions, not words.
"Another hundred habaneros... a teaspoon of tumeric... and a heaping helping of nitroglycerin!" The kitten in a chef's hat laughed maniacally as the pot he was stirring promptly exploded.
Woot got a promotion and a pay rise ᕙ( • ‿ • )ᕗ now I'm set.
does anyone feel like explaining to me the difference between simulation and emulation? you have my full permission to be as pedantic as you want.

Forum statistics

Threads
116,013
Messages
1,094,909
Members
151,326
Latest member
redhumanbox
Top