Per 2016, RMID pindah ke RMID Discord (Invite link dihapus untuk mencegah spambot -Theo @ 2019). Posting sudah tidak bisa dilakukan lagi.
Mohon maaf atas ketidaknyamanannya dan mohon kerjasamanya.

Share | 
 

 problem scrip time

Topik sebelumnya Topik selanjutnya Go down 
Pilih halaman : 1, 2  Next
problem scrip time Empty2012-08-14, 20:06
Postproblem scrip time
#1
ichsan009 
Newbie
Newbie
ichsan009

Level 5
Posts : 60
Thanked : 0
Engine : RMVX Ace
Skill : Intermediate
Type : Databaser

problem scrip time Vide
ni om saya kan pake conditional branch ini buat ngatur pda waktu2 tertentu kek gini
[b]GameTime::hour? >= 1 and GameTime::hour? < 6
nah itu kan buat ngatur nya dari angka 1 sampe 12 am sya pengen ngaturnya dari pm gmn ya. . .?
problem scrip time Empty2012-08-14, 20:10
PostRe: problem scrip time
#2
100101 
Novice
Novice
100101

Level 5
Posts : 181
Thanked : 1
Engine : RMVX
Skill : Very Beginner
Type : Writer

problem scrip time Vide
Pakainya Script atau Event?
problem scrip time Empty2012-08-14, 21:15
PostRe: problem scrip time
#3
ashm 
Veteran
Veteran
ashm

Level 5
Posts : 1131
Thanked : 8
Engine : RMVX Ace
Skill : Intermediate
Type : Event Designer
Awards:

problem scrip time Vide
Lha, biasanya kan kalo script time system mah bakal nyimpen di variable tertentu kan.
Boleh liat script nya?
Ane gak maen VxA
problem scrip time Empty2012-08-14, 21:19
PostRe: problem scrip time
#4
aidilriski 
Senior
Senior
aidilriski

Level 5
Posts : 643
Thanked : 2
Engine : Multi-Engine User
Type : Mapper

problem scrip time Vide
:hmm: saya yakin ini buatnya pke event, iya kan ts?
problem scrip time Empty2012-08-15, 14:21
PostRe: problem scrip time
#5
ichsan009 
Newbie
Newbie
ichsan009

Level 5
Posts : 60
Thanked : 0
Engine : RMVX Ace
Skill : Intermediate
Type : Databaser

problem scrip time Vide
ya saya pake ivent,ke conditional bracnh trus masukin scrip nya ini
GameTime::hour? >= 1 and GameTime::hour? < 6
nah gmn ya om. . .?
problem scrip time Empty2012-08-15, 14:31
PostRe: problem scrip time
#6
aidilriski 
Senior
Senior
aidilriski

Level 5
Posts : 643
Thanked : 2
Engine : Multi-Engine User
Type : Mapper

problem scrip time Vide
bntar, time system nya pke event ato pke script, itu maksud saya, klo script, boleh saya liat?
problem scrip time Empty2012-08-16, 12:16
PostRe: problem scrip time
#7
ichsan009 
Newbie
Newbie
ichsan009

Level 5
Posts : 60
Thanked : 0
Engine : RMVX Ace
Skill : Intermediate
Type : Databaser

problem scrip time Vide
pake scrip day and night om nih
#Basic Game Time + Night/Day
#----------#
#Features: Provides a series of functions to set and recall current game time
# as well customizable tints based on current game time to give the
# appearance of night and day.
#
#Usage: Script calls:
# GameTime::minute? - returns the current minute
# GameTime::hour? - returns the current hour
# GameTime::set(time) - sets the game time to time, in frames (max:1440)
# GameTime::change(time) - increments the game time! (can be negative)
# GameTime::pause_time(set) - stops time for events and stuff, true or false
# GameTime::pause_tint(set) - time runs, but tints do not update
# GameTime::clock(set) - sets whether clock is visible or not
#
#Customization: Set below, in comments.
#
#Examples: GameTime::set(360)
#
#----------#
#-- Script by: V.M of D.T
#--- Free to use in any project with credit given

#---Game Clock---#
#USE_CLOCK to true to display game time clock
#CLOCK_POSITION for position of clock
# 1 = topleft, 2 = topright, 3 = bottomleft, 4 = bottomright
#CLOCK_TOGGLE is any input button available, see the INPUT help file for options
#------#
USE_CLOCK = true
CLOCK_POSITION = 4
CLOCK_TOGGLE = :SHIFT

module GameTime
#---Game Time Details---#
#Number of frames in a game minute, 60 frames = 1 second
TIME_COUNT = 3
#Sets whether to tint screen based on game time
USE_TINT = true

#True to pause time while not in map or while during a message
PAUSE_IN_COMBAT = false
PAUSE_NOT_IN_MAP = true
PAUSE_IN_MESSAGE = true

#Sets time frames of tints by minute count, one day is 1440 minutes
# 0 = 12am, 360 = 6am, 720 = 12pm, 1080 = 6pm etc...
PRESUNRISE_TIME = 240
SUNRISE_TIME = 360
NOONSTART_TIME = 660
NOONEND_TIME = 900
PRESUNSET_TIME = 1080
SUNSET_TIME = 1260
MIDNIGHT_TIME = 60 #Must be greater than 0

#Sets custome tints
PRESUNRISE_TONE = Tone.new(-75,-75,0,50)
SUNRISE_TONE = Tone.new(0,0,0,0)
NOONSTART_TONE = Tone.new(45,45,0,-25)
NOONEND_TONE = Tone.new(0,0,0,0)
PRESUNSET_TONE = Tone.new(-50,-50,0,25)
SUNSET_TONE = Tone.new(-75,-100,0,75)
MIDNIGHT_TONE = Tone.new(-125,-125,0,125)

#Include the ids of any maps not to be tinted based on time
# Usually reserved for indoor maps
NOTINTMAPS = [2]
#---END---#

def self.init
$game_time = 0
$game_time_pause_time = false
$game_time_pause_tint = false
end
def self.update
if $game_time_pause_time then return else end
case SceneManager::scene_is?(Scene_Map)
when true
if $game_message.visible == true && PAUSE_IN_MESSAGE then else
$game_time += 1 if Graphics.frame_count % TIME_COUNT == 0 end
when false
if SceneManager::scene_is?(Scene_Battle) && PAUSE_IN_COMBAT != true
$game_time += 1 if Graphics.frame_count % TIME_COUNT == 0 end
end
if $game_time == 1440 then $game_time = 0 end
GameTime::tint if $game_time_pause_tint != true
end
def self.hour?
return $game_time / 60
end
def self.minute?
return $game_time % 60
end
def self.time?
meri = "AM"
hour = GameTime::hour?
minute = GameTime::minute?
if hour > 11 then meri = "PM" end
if hour == 0 then hour = 12; meri = "AM" end
if hour > 12 then hour -= 12 end
if hour < 10 then hour = " " + hour.to_s else hour.to_s end
if minute < 10 then minute = "0" + minute.to_s else minute.to_s end
return hour.to_s + ":" + minute.to_s + " " + meri
end
def self.set(number)
$game_time = number if number < 1440
GameTime::tint(0)
end
def self.change(number)
$game_time += number
$game_time -= 1440 if $game_time > 1440
$game_time += 1440 if $game_time < 0
GameTime::tint(0)
end
def self.tint(tint = 60)
if USE_TINT != true then return end
for i in NOTINTMAPS
if $game_map.map_id == i
$game_map.screen.start_tone_change(Tone.new(0,0,0,0),0)
return
end
end
if SceneManager::scene_is?(Scene_Map) then else return end
case $game_time
when PRESUNRISE_TIME .. SUNRISE_TIME
$game_map.screen.start_tone_change(PRESUNRISE_TONE, tint)
when SUNRISE_TIME .. NOONSTART_TIME
$game_map.screen.start_tone_change(SUNRISE_TONE, tint)
when NOONSTART_TIME .. NOONEND_TIME
$game_map.screen.start_tone_change(NOONSTART_TONE, tint)
when NOONEND_TIME .. PRESUNSET_TIME
$game_map.screen.start_tone_change(NOONEND_TONE, tint)
when PRESUNSET_TIME .. SUNSET_TIME
$game_map.screen.start_tone_change(PRESUNSET_TONE, tint)
when SUNSET_TIME .. 1440
$game_map.screen.start_tone_change(SUNSET_TONE, tint)
when 0 .. MIDNIGHT_TIME
$game_map.screen.start_tone_change(SUNSET_TONE, tint)
when MIDNIGHT_TIME .. PRESUNRISE_TIME
$game_map.screen.start_tone_change(MIDNIGHT_TONE, tint)
end
end
def self.pause_time(set)
$game_time_pause_time = set
end
def self.pause_tint(set)
$game_time_pause_tint = set
end
def self.clock(set)
SceneManager.scene.clock_visible?(set)
end

class Window_Clock < Window_Base
def initialize
case CLOCK_POSITION
when 1
super(0,0,115,56)
when 2
super(429,0,115,56)
when 3
super(0,360,115,56)
when 4
super(429,360,115,56)
end
end
def update
self.contents.clear
self.contents.draw_text(0,0,100,24,GameTime::time?)
end
end

end

module DataManager
class << self
alias gametime_msc make_save_contents
alias gametime_esc extract_save_contents
end
def self.make_save_contents
contents = gametime_msc
contents[:gametime] = $game_time
contents
end
def self.extract_save_contents(contents)
gametime_esc(contents)
$game_time = contents[:gametime]
end
end


class Scene_Map < Scene_Base
alias gametime_post_transfer post_transfer
alias gametime_create_all_windows create_all_windows
alias gametime_update_map update
def post_transfer
GameTime::tint(0)
gametime_post_transfer
end
def create_all_windows
gametime_create_all_windows
@gametimeclock = GameTime::Window_Clock.new if USE_CLOCK
end
def update
gametime_update_map
@gametimeclock.update if @gametimeclock.nil? == false
if Input.trigger?(CLOCK_TOGGLE) and @gametimeclock.nil? == false
@gametimeclock.visible ? @gametimeclock.visible = false : @gametimeclock.visible = true
end
end
def clock_visible?(set)
@gametimeclock.visible = set
end
end

class Scene_Base
alias gametime_update update
def update
gametime_update
GameTime::update
end
end

GameTime::init
problem scrip time Empty2012-08-16, 12:39
PostRe: problem scrip time
#8
aidilriski 
Senior
Senior
aidilriski

Level 5
Posts : 643
Thanked : 2
Engine : Multi-Engine User
Type : Mapper

problem scrip time Vide
nah, itu dah dicoba, mau diapain :ngacay2: ?
problem scrip time Empty2012-08-16, 14:02
PostRe: problem scrip time
#9
ichsan009 
Newbie
Newbie
ichsan009

Level 5
Posts : 60
Thanked : 0
Engine : RMVX Ace
Skill : Intermediate
Type : Databaser

problem scrip time Vide
saya kan pake efect time open close gitu jadi jam segini buka jam segitu tutp kek gitu gmn ya :D . . ?
saya dah coba pake conditional bracnh kek gini
GameTime::hour? >= 1 and GameTime::hour? < 6
nah itu kan cuma bisa buka jam 1 am tutup jam 6 am,saya pengen buka nya pas PM gmn y :(
problem scrip time Empty2012-08-16, 14:06
PostRe: problem scrip time
arls 
Advance
Advance
arls

Level 5
Posts : 412
Thanked : 3
Engine : RMVX Ace
Skill : Very Beginner
Type : Mapper
Awards:
problem scrip time Vide
bagaimana kalau pakai sistem 24 jam? Jadi jam 6 nya gk 2 kali
problem scrip time Empty2012-08-16, 14:18
PostRe: problem scrip time
Lukas 
Senior
Senior
avatar

Level 5
Posts : 618
Thanked : 22

problem scrip time Vide
lanjut aja gan,
GameTime::hour? >= 13
klo aku baca scriptnya, tulisannya emang di ubah jadi kembali ke angka 1 klo lebih dari 12.
tapi tetep aja hour sampe 24. :ngacay2:
problem scrip time Empty2012-08-16, 15:50
PostRe: problem scrip time
aidilriski 
Senior
Senior
aidilriski

Level 5
Posts : 643
Thanked : 2
Engine : Multi-Engine User
Type : Mapper

problem scrip time Vide
bner tuh kta atas saya ^ :v Lanjut wae, soalnya yg jdi PM itu tulisannya doang, jamnya tetap ampe 24 :- Tpi, klo saya liat, itu ga pke jam, tpi pke waktu yg 1440 itu ya? :v
problem scrip time Empty2012-08-16, 16:02
PostRe: problem scrip time
Lukas 
Senior
Senior
avatar

Level 5
Posts : 618
Thanked : 22

problem scrip time Vide
aidilriski wrote:
bner tuh kta atas saya ^ :v Lanjut wae, soalnya yg jdi PM itu tulisannya doang, jamnya tetap ampe 24 :- Tpi, klo saya liat, itu ga pke jam, tpi pke waktu yg 1440 itu ya? :v
itu count yang tambah stiap menit :v
problem scrip time Empty2012-08-16, 22:01
PostRe: problem scrip time
larkuzo 
Advance
Advance
larkuzo

Level 5
Posts : 445
Thanked : 12
Engine : RMXP
Skill : Beginner
Type : Event Designer

problem scrip time Vide
Coba om jangan pake
GameTime::hour? >= 1 and
GameTime::hour? < 6
tapi pake
$game_time >= 780 and $game_time < 1080
atau
$game_time.between?(780,1080)

Cara ngitungnya :
Jam * 60, contoh
Pengen jam 13 (jam 1 siang) = 13 * 60 = 780

Semoga membantu :D
problem scrip time Empty2012-08-17, 08:42
PostRe: problem scrip time
ichsan009 
Newbie
Newbie
ichsan009

Level 5
Posts : 60
Thanked : 0
Engine : RMVX Ace
Skill : Intermediate
Type : Databaser

problem scrip time Vide
@lukas tadi jam 13 sempet bisa pas jam 20 nya g isa :( tq sebelumnya
@larkuzo jam 13 bisa tapi pas mau di set jam 19 g isa ~_~
problem scrip time Empty2012-08-17, 10:01
PostRe: problem scrip time
larkuzo 
Advance
Advance
larkuzo

Level 5
Posts : 445
Thanked : 12
Engine : RMXP
Skill : Beginner
Type : Event Designer

problem scrip time Vide
Yang pake between juga gak bisa?
problem scrip time Empty2012-08-17, 10:07
PostRe: problem scrip time
Lukas 
Senior
Senior
avatar

Level 5
Posts : 618
Thanked : 22

problem scrip time Vide
ga bisanya gimana ?
aku ga liat sesuatu yg aneh dari scriptnya..

klo mau bantuan lebih lanjut upload demo nya :v
problem scrip time Empty2012-08-18, 05:15
PostRe: problem scrip time
ichsan009 
Newbie
Newbie
ichsan009

Level 5
Posts : 60
Thanked : 0
Engine : RMVX Ace
Skill : Intermediate
Type : Databaser

problem scrip time Vide
@larkuzo bisa tapi pas mau (1080,360)g isa
@lukas nih om cek http://www.4sh*red.com/rar/02LPGGVU/Project10.html
problem scrip time Empty2012-08-18, 05:42
PostRe: problem scrip time
aidilriski 
Senior
Senior
aidilriski

Level 5
Posts : 643
Thanked : 2
Engine : Multi-Engine User
Type : Mapper

problem scrip time Vide
di saya bisa tuh :- Mungkin kmu salah ngali, mau jam 19 alias jam 7 malam / PM kan? Bkan 1080, tpi 1140 :-
problem scrip time Empty2012-08-18, 06:16
PostRe: problem scrip time
Lukas 
Senior
Senior
avatar

Level 5
Posts : 618
Thanked : 22

problem scrip time Vide
GameTime::hour? >= 20
pake fiitur itupun jadi :ngacay2:
problem scrip time Empty2012-08-18, 06:18
PostRe: problem scrip time
larkuzo 
Advance
Advance
larkuzo

Level 5
Posts : 445
Thanked : 12
Engine : RMXP
Skill : Beginner
Type : Event Designer

problem scrip time Vide
Oh, jam 18 sampe jam 6 ya?
Kalo menurut saya kayanya kalo dibalikin minimalnya lebih gede dari maksimalnya kayanya gak bisa deh, belum dicobain sih :D
Mungkin bisa pake cara ini :
unless $game_time.between?(360,1080)

Silahkan dicoba :D
problem scrip time Empty2012-08-18, 06:22
PostRe: problem scrip time
Lukas 
Senior
Senior
avatar

Level 5
Posts : 618
Thanked : 22

problem scrip time Vide
larkuzo wrote:
Oh, jam 18 sampe jam 6 ya?
Kalo menurut saya kayanya kalo dibalikin minimalnya lebih gede dari maksimalnya kayanya gak bisa deh, belum dicobain sih :D
Mungkin bisa pake cara ini :
unless $game_time.between?(360,1080)

Silahkan dicoba :D
klo pake itu kayanya fatal error deh :ngacay2:
problem scrip time Empty2012-08-18, 06:30
PostRe: problem scrip time
larkuzo 
Advance
Advance
larkuzo

Level 5
Posts : 445
Thanked : 12
Engine : RMXP
Skill : Beginner
Type : Event Designer

problem scrip time Vide
Kan kayanya :ngacay2:
Ya gak tau juga sih soalnya kalau dibalikin value minimal sama maksimalnya mungkin gak bisa :v
Mungkin bisa..
Quote :
praktek adalah jalan terbaik dan
memuaskan
problem scrip time Empty2012-08-18, 06:37
PostRe: problem scrip time
Lukas 
Senior
Senior
avatar

Level 5
Posts : 618
Thanked : 22

problem scrip time Vide
larkuzo wrote:
Oh, jam 18 sampe jam 6 ya?
Kalo menurut saya kayanya kalo dibalikin minimalnya lebih gede dari maksimalnya kayanya gak bisa deh, belum dicobain sih :D
Mungkin bisa pake cara ini :
unless $game_time.between?(360,1080)

Silahkan dicoba :D
jam 18 sampe jam 6
between?(360,1080) bukannya ini jadinya jam 6 - 18?

Quote :
praktek adalah jalan terbaik dan memuaskan
emang tapi ya klo dah tau salah trus di praktekan buat apa? :ngacay2:
problem scrip time Empty2012-08-18, 06:45
PostRe: problem scrip time
larkuzo 
Advance
Advance
larkuzo

Level 5
Posts : 445
Thanked : 12
Engine : RMXP
Skill : Beginner
Type : Event Designer

problem scrip time Vide
Quote :
jam 18 sampe jam 6
between?(360,1080) bukannya
ini jadinya jam 6 - 18?
Kan pake unless :ngacay2:

Quote :
Mungkin bisa pake cara ini :
unless $game_time.between?
(360,1080)



Praktek untuk menghilangkan rasa penasaran akan hasil yang terjadi :hammer: :kabur:
problem scrip time Empty
PostRe: problem scrip time
Sponsored content 




problem scrip time Vide
 

problem scrip time

Topik sebelumnya Topik selanjutnya Kembali Ke Atas 

Similar topics

+
Halaman 1 dari 2Pilih halaman : 1, 2  Next

Permissions in this forum:Anda tidak dapat menjawab topik
RPGMakerID :: Scripts & Event Systems :: RMVX Ace Scripts :: RGSS3 Request-