포만감을 타이머를 이용해 적용했는데
음식을 먹으면 포만감이 늘어나서 타이머가 늘어나야하는데 안늘어나네요 ㅠ..;;
스크립트를 이용해야하나요?
아니면 포만감을 다른방법으로 처리할수가 있나요?
시간이 흐름에 따라 포만감이 저절로 줄어들게 할때는 타이머가 유용한것같은데
RMVX
2010.09.23 01:14
타이머 시간을 늘려주려고 하면 어떻게 해야하나요?
조회 수 873 추천 수 0 댓글 3
| 종류 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
|---|---|---|---|---|---|
| 공지 | 묻고 답하기 가이드 | 습작 | 2014.06.14 | 64902 | |
| RM2k | RPG2000 턴제전투 적게이지 하는방법좀!! | 백귀신 | 2010.09.25 | 1233 | |
| RMVX | 최고레벨 올리기 8 | 잉여잉어빵 | 2010.09.24 | 782 | |
| RMVX | 상점과 아이탬 ㅜㅜㅜㅜ | 잉여잉어빵 | 2010.09.24 | 775 | |
| RMXP | 전직하는법좀 물을게요... 2 | 듀오 | 2010.09.24 | 897 | |
| RMXP | 아오오니 튀어나오는법 1 | 김빅밤 | 2010.09.24 | 1755 | |
| RMXP | 지도창 1 | 가리로루 | 2010.09.24 | 850 | |
| RMVX | 타이틀음악 1 | 프라임헌터즈 | 2010.09.24 | 800 | |
| RMVX | 레벨업 메시지 표시 윈도우 대화창 | 박보영 | 2010.09.24 | 864 | |
| RMVX | 맵바껴도 따라오는 거 어떻게하죠 2 | 프라임헌터즈 | 2010.09.24 | 948 | |
| RMVX | 몬스터 잡는 것에대한 변수 설정 2 | 박보영 | 2010.09.24 | 795 | |
| RMVX | 투명색 지정이 않되요 2 | 전투머신Mㅡ001 | 2010.09.24 | 986 | |
| RMVX | Crissaegrim_ABS 질문 1 | 네오리스 | 2010.09.24 | 729 | |
| RMVX | RPG VX 질문 글씨문제요 4 | 메이드모에 | 2010.09.23 | 1155 | |
| RMVX | 부드럽게 움직이는 스크립트와 동료따라오는 스크립트 1 | 놀다가 | 2010.09.23 | 1083 | |
| RMVX | ...움직이는거 풀었더니 벽이뚫린다요 2 | 엔티르카 | 2010.09.23 | 849 | |
| RMXP | 전투장면 1 | BBC | 2010.09.23 | 739 | |
| RMVX | 타이머 시간을 늘려주려고 하면 어떻게 해야하나요? 3 | 젯젯 | 2010.09.23 | 873 | |
| RMXP | 새로운 맵칩에 대해 3 | 나는나다 | 2010.09.23 | 1015 | |
| RMXP | 스크립트가 이상ㅠㅠ 3 | 나는나다 | 2010.09.23 | 1016 | |
| RMXP | 스킬에 관해서.. | zozgga | 2010.09.22 | 793 |
■이벤트 제작용 소품 메소드힐맞댐 RGSS2 DAIpage■ v1.4 ●기능●
스크립트없이는 귀찮기도 하고 할 수 없거나 하는 이벤트 커멘드의 힐맞댐입니다.
메소드 설명과 같이 이벤트 커멘드:스크립트나 조건 분기:스크립트에 기술,
필요에 따라서 인수를 바꾸어 사용해 주세요. ●재정의하고 있는 개소●
없음 ●갱신 이력●
09/01/29:좌표 지정 애니메이션의 불편 수정.페이지 지정 이벤트 기동을 추가.
09/01/26:특수 선택사항에 기능 추가.지정 좌표에 애니메이션 표시를 추가.
08/10/05:맵외로부터의 셀프 스윗치 조작이 정상적으로 기능하지 않는 불편을 수정.
08/09/21:특수 선택사항 3종, 좌표 판정 1종 추가. =end if false
#==============================================================================
# ■ 추가 메소드의 설명·사용 예의 같은 것 ■
#==============================================================================
#============================================================================
# ◆ 이벤트 커멘드:스크립트로 사용 ◆
#============================================================================ timer_up(10)
# 타이머를 10초 늘린다.
timer_up(-10)
# 타이머를 10초 줄인다. pos_event_start(1, 5)
# X좌표가 1 , Y좌표가 5 의 이벤트를 기동. id_event_start(7)
# 이벤트 ID 7 을 기동. event_page_start(7, 4)
# 이벤트 ID 7 의 4 페이지눈을 기동. batch_events_erase([1,2,5,10])
# 이벤트 ID 1, 2, 5, 10 을 일제히 소거.
batch_events_balloon([1,2,5,10], 1)
# 이벤트 ID 1, 2, 5, 10 에 일제히 머위 국물 「깜짝」을 표시. name_events_balloon("", 1)
# 이벤트명에 「」를 포함한 이벤트 모두에 일제히 머위 국물 「깜짝」을 표시.
map_name_events_erase("사라져 주세요")
# 이벤트명에 「사라져 주세요」를 포함한 이벤트 모두를 일제히 소거.
push_direction
# 플레이어를 「이 이벤트」의 방향으로 향하게 한다.(접촉하고 있지 않으면 안됩니다) allvariables_reset
# 게임내의 전변수를 초기화합니다.
allswitches_reset
# 게임내의 전스윗치를 초기화합니다. allself_reset
# 게임내의 전셀프 스윗치를 초기화합니다.
map_allself_true(1, "A")
# 맵 ID 1 안에 있는 모든 셀프 스윗치 「A」를 일괄 온.
map_allself_false(1, "A")
# 맵 ID 1 안에 있는 모든 셀프 스윗치 「A」를 일괄 오프.
map_allself_name_true(3, "C", "무")
# 맵 ID 3 안에 있어,"무"를 포함한 이벤트명의 셀프 스윗치 「C」를 일괄 온.
map_allself_name_false(5, "A", "보상")
# 맵 ID 5 안에 있어,"보상"을 포함한 이벤트명의 셀프 스윗치 「A」를 일괄 오프.
pos_event_self_true(5, 10 ,"C")
# X좌표가 5 , Y좌표가 10 의 이벤트의 셀프 스윗치 「C」를 온.
pos_event_self_false(5, 10 ,"C")
# X좌표가 5 , Y좌표가 10 의 이벤트의 셀프 스윗치 「C」를 오프.
pos_event_self_rev(5, 10 ,"C")
# X좌표가 5 , Y좌표가 10 의 이벤트의 셀프 스윗치 「C」를 역전.
party_choice(20)
# 파티 멤버를 선택사항으로 표시.결과를 변수 20 에 격납.
# ※결과(0:선두 멤버 3:4번째의 멤버 , 4:캔슬) party_choice_existing(20)
# 생존하고 있는 파티 멤버를 선택사항으로 표시.결과를 변수 20 에 격납.
# ※결과(0:선두 멤버 3:4번째의 멤버 , 4:캔슬) party_choice_dead(20)
# 전투 불능의 파티 멤버를 선택사항으로 표시.결과를 변수 20 에 격납.
# ※결과(0:선두 멤버 3:4번째의 멤버 , 4:캔슬) party_choice_id(20)
# 파티 멤버를 선택사항으로 표시.결과를 변수 20 에 격납.
# ※결과(선택된 캐릭터의 ID , 캔슬시는 0) party_choice_existing_id(20)
# 생존하고 있는 파티 멤버를 선택사항으로 표시.결과를 변수 20 에 격납.
# ※결과(선택된 캐릭터의 ID , 캔슬시는 0) party_choice_dead_id(20)
# 전투 불능의 파티 멤버를 선택사항으로 표시.결과를 변수 20 에 격납.
# ※결과(선택된 캐릭터의 ID , 캔슬시는 0) anime(600, 1200, 5)
# 화면 좌표의 x100,y200에 5번의 애니메이션을 표시. #============================================================================
# ◆ 조건 분기:스크립트로 사용 ◆
#============================================================================ pos?(1, 2)
# 이벤트 ID 1 으로 이벤트 ID 2 의 좌표가 동일한가?
name_pos?("매직 스퀘어")
# 플레이어와 「매직 스퀘어」가 포함되는 이름의 이벤트의 좌표가 동일한가? player_front_pos?("문")
# 플레이어의 정면 좌표에 「문」이 포함되는 이름의 이벤트가 존재할까? pos_xy?(10, 11 ,20)
# 이벤트 ID 20 이 X좌표 10 , Y좌표 11에 존재할까?
end #==============================================================================
# ■ Game_Interpreter
#==============================================================================
class Game_Interpreter
#--------------------------------------------------------------------------
# ● 지정 좌표에 애니메이션 표시
#--------------------------------------------------------------------------
def anime(x, y, id)
s = Sprite_Base.new
s.bitmap = Bitmap.new(1, 1)
s.x, s.y = x, y
s.start_animation($data_animations[id])
while s.animation?
s.update
Graphics.update
end
s.dispose
s.bitmap.dispose
end
#============================================================================
# ★ 타이머의 특수 조작
#============================================================================
#--------------------------------------------------------------------------
# ● 타이머잔초수의 증감
# min : 초수(마이너스 지정으로 감소)
#--------------------------------------------------------------------------
def timer_up(min)
$game_system.timer += min * Graphics.frame_rate
end
#============================================================================
# ★ 특수 선택사항
#============================================================================
#--------------------------------------------------------------------------
# ● 파티 멤버를 선택사항으로 표시
# variables: 결과 격납 변수
#--------------------------------------------------------------------------
def party_choice(variables)
$game_party.members.each { |actor|$game_message.texts.push(actor.name)}
$game_message.choice_start = 0
$game_message.choice_max = $game_party.members.size
$game_message.choice_cancel_type = 4
$game_message.choice_proc = Proc.new { |n|$game_variables[variables] = n }
set_message_waiting
end
#--------------------------------------------------------------------------
# ● 생존하고 있는 파티 멤버를 선택사항으로 표시
# variables: 결과 격납 변수
#--------------------------------------------------------------------------
def party_choice_existing(variables)
return if $game_party.existing_members.size == 0
$game_party.existing_members.each { |actor|$game_message.texts.push(actor.name)}
$game_message.choice_start = 0
$game_message.choice_max = $game_party.existing_members.size
$game_message.choice_cancel_type = 4
$game_message.choice_proc = Proc.new { |n|$game_variables[variables] = n }
set_message_waiting
end
#--------------------------------------------------------------------------
# ● 사망해 있는 파티 멤버를 선택사항으로 표시
# variables: 결과 격납 변수
#--------------------------------------------------------------------------
def party_choice_dead(variables)
return if $game_party.dead_members.size == 0
$game_party.dead_members.each { |actor|$game_message.texts.push(actor.name)}
$game_message.choice_start = 0
$game_message.choice_max = $game_party.dead_members.size
$game_message.choice_cancel_type = 4
$game_message.choice_proc = Proc.new { |n|$game_variables[variables] = n }
set_message_waiting
end
#--------------------------------------------------------------------------
# ● 파티 멤버를 선택사항으로 표시, 결과를 ID로 격납
# variables: 결과 격납 변수
#--------------------------------------------------------------------------
def party_choice_id(variables)
$game_party.members.each { |actor|$game_message.texts.push(actor.name)}
$game_message.choice_start = 0
$game_message.choice_max = $game_party.members.size
$game_message.choice_cancel_type = 0
$game_message.choice_proc = Proc.new {
|n|$game_variables[variables] = $game_party.members[n].id
}
set_message_waiting
end
#--------------------------------------------------------------------------
# ● 생존하고 있는 파티 멤버를 선택사항으로 표시, 결과를 ID로 격납
# variables: 결과 격납 변수
#--------------------------------------------------------------------------
def party_choice_existing_id(variables)
return if $game_party.existing_members.size == 0
$game_party.existing_members.each { |actor|$game_message.texts.push(actor.name)}
$game_message.choice_start = 0
$game_message.choice_max = $game_party.existing_members.size
$game_message.choice_cancel_type = 0
$game_message.choice_proc = Proc.new {
|n|$game_variables[variables] = $game_party.existing_members[n].id
}
set_message_waiting
end
#--------------------------------------------------------------------------
# ● 사망해 있는 파티 멤버를 선택사항으로 표시, 결과를 ID로 격납
# variables: 결과 격납 변수
#--------------------------------------------------------------------------
def party_choice_dead_id(variables)
return if $game_party.dead_members.size == 0
$game_party.dead_members.each { |actor|$game_message.texts.push(actor.name)}
$game_message.choice_start = 0
$game_message.choice_max = $game_party.dead_members.size
$game_message.choice_cancel_type = 0
$game_message.choice_proc = Proc.new {
|n|$game_variables[variables] = $game_party.dead_members[n].id
}
set_message_waiting
end
#============================================================================
# ★ 좌표 관리 관련
#============================================================================
#--------------------------------------------------------------------------
# ● 캐릭터끼리의 좌표 일치 판정
# id_1 : 판정하는 이벤트의 ID
# id_2 : 판정하는 이벤트의 ID
#--------------------------------------------------------------------------
def pos?(id_1, id_2)
c_1 = get_character(id_1)
c_2 = get_character(id_2)
return [c_1.x, c_1.y] == [c_2.x, c_2.y]
end
#--------------------------------------------------------------------------
# ● 플레이어와 지정명을 포함한 이벤트의 좌표 일치 판정
# name : 이벤트명에 포함되는 문자열
#--------------------------------------------------------------------------
def name_pos?(name)
for event in $game_map.events.values
if event.name.include?(name)
return true if [$game_player.x, $game_player.y] == [event.x, event.y]
end
end
return false
end
#--------------------------------------------------------------------------
# ● 플레이어의 정면으로 지정명을 포함한 이벤트가 존재할까 판정
# name : 이벤트명에 포함되는 문자열
#--------------------------------------------------------------------------
def player_front_pos?(name)
front_x = $game_map.x_with_direction($game_player.x, $game_player.direction)
front_y = $game_map.y_with_direction($game_player.y, $game_player.direction)
for event in $game_map.events_xy(front_x, front_y)
return true if event.name.include?(name)
end
return false
end
#--------------------------------------------------------------------------
# ● 지정 위치로 지정 ID의 이벤트가 존재하는지를 판정
# x : X좌표
# y : Y좌표
# id : 이벤트 ID
#--------------------------------------------------------------------------
def pos_xy?(x, y ,id)
event = get_character(id)
return [event.x, event.y] == [x, y]
end
#============================================================================
# ★ 이벤트의 특수 조작
#============================================================================
#--------------------------------------------------------------------------
# ● 지정 위치의 이벤트를 기동
# x : 지정 위치의 x 좌표
# y : 지정 위치의 y 좌표
#--------------------------------------------------------------------------
def pos_event_start(x, y)
for event in $game_map.events_xy(x, y)
event.start
end
end
#--------------------------------------------------------------------------
# ● ID로부터 이벤트를 기동
# id : 기동하는 이벤트의 ID
#--------------------------------------------------------------------------
def id_event_start(id)
event = $game_map.events[id]
@child_interpreter = Game_Interpreter.new(@depth + 1)
@child_interpreter.setup(event.list, @event_id)
end
#--------------------------------------------------------------------------
# ● 페이지 지정 이벤트 기동
# id : 이벤트 ID (0:정수)
# page : 이벤트 페이지
#--------------------------------------------------------------------------
def event_page_start(id, page)
event = id == 0 ? get_character(0) : $game_map.events[id]
list = event.instance_variable_get(:@event).pages[page-1].list
return if list == nil
@child_interpreter = Game_Interpreter.new(@depth + 1)
@child_interpreter.setup(list, id)
end
#--------------------------------------------------------------------------
# ● 지정 이벤트를 일제히 일시 소거
# id : 일제 소거하는 이벤트의 ID를 배열로 지정
#--------------------------------------------------------------------------
def batch_events_erase(id)
for i in id
$game_map.events[i].erase
end
end
#--------------------------------------------------------------------------
# ● 맵내의 지정명을 포함한 이벤트를 일제히 일시 소거
# name : 이벤트명에 포함되는 문자열
#--------------------------------------------------------------------------
def name_events_erase(name)
for event in $game_map.events.values
id = event.id
if event.name.include?(name)
$game_map.events[id].erase
end
end
$game_map.refresh
end
#--------------------------------------------------------------------------
# ● 지정 이벤트에 일제히 머위 국물 아이콘 표시
# id : 일제히 머위 국물 표시하는 이벤트의 ID를 배열로 지정
# balloon : 머위 국물의 ID
#--------------------------------------------------------------------------
def batch_events_balloon(id, balloon)
for i in id
$game_map.events[i].balloon_id = balloon
end
end
#--------------------------------------------------------------------------
# ● 지정명을 포함한 이벤트에 일제히 머위 국물 아이콘 표시
# name : 이벤트명에 포함되는 문자열
# balloon : 머위 국물의 ID
#--------------------------------------------------------------------------
def name_events_balloon(name, balloon)
for event in $game_map.events.values
id = event.id
if event.name.include?(name)
$game_map.events[id].balloon_id = balloon
end
end
$game_map.refresh
end
#--------------------------------------------------------------------------
# ● 맵내의 지정명을 포함한 이벤트를 일제히 일시 소거
# name : 이벤트명에 포함되는 문자열
#--------------------------------------------------------------------------
def map_name_events_erase(name)
for event in $game_map.events.values
id = event.id
if event.name.include?(name)
$game_map.events[id].erase
end
end
$game_map.refresh
end
#--------------------------------------------------------------------------
# ● 지정 이벤트의 방향으로 플레이어의 방향을 변경
# id : 이벤트의 ID
#--------------------------------------------------------------------------
def push_direction
character = get_character(0)
cx = character.x
cy = character.y
player = get_character(-1)
px = player.x
py = player.y
direction = 0
if cx == px
direction = 2 if cy >= py
direction = 8 if cy <= py
end
if cy == py
direction = 6 if cx >= px
direction = 4 if cx <= px
end
player.set_direction(direction )
@stop_count = 0
end
#============================================================================
# ★ 변수·스윗치·셀프 스윗치의 특수 조작
#============================================================================
#--------------------------------------------------------------------------
# ● 게임내의 전변수의 초기화
#--------------------------------------------------------------------------
def allvariables_reset
$game_variables = Game_Variables.new
$game_map.refresh
end
#--------------------------------------------------------------------------
# ● 게임내의 전스윗치의 초기화
#--------------------------------------------------------------------------
def allswitches_reset
$game_switches = Game_Switches.new
$game_map.refresh
end
#--------------------------------------------------------------------------
# ● 게임내의 전셀프 스윗치의 초기화
#--------------------------------------------------------------------------
def allself_reset
$game_self_switches = Game_SelfSwitches.new
$game_map.refresh
end
#--------------------------------------------------------------------------
# ● 지정 MAP의 전셀프 스윗치 일괄 온
# map_id : 맵의 ID
# key : 셀프 스윗치("A"와 같이 지정)
#--------------------------------------------------------------------------
def map_allself_true(map_id, key="A")
map = load_data(sprintf("Data/Map%03d.rvdata", map_id))
events = []
for i in map.events.keys
events[i] = Game_Event.new(map_id, map.events[i])
end
for event in events
next if event == nil
id = event.id
if !$game_self_switches[[map_id, id, key]]
$game_self_switches[[map_id, id, key]] = true
end
end
$game_map.refresh if map_id == $game_map.map_id
end
#--------------------------------------------------------------------------
# ● 지정 MAP의 전셀프 스윗치 일괄 오프
# map_id : 맵의 ID
# key : 셀프 스윗치("A"와 같이 지정)
#--------------------------------------------------------------------------
def map_allself_false(map_id, key="A")
map = load_data(sprintf("Data/Map%03d.rvdata", map_id))
events = []
for i in map.events.keys
events[i] = Game_Event.new(map_id, map.events[i])
end
for event in events
next if event == nil
id = event.id
if $game_self_switches[[map_id, id, key]]
$game_self_switches[[map_id, id, key]] = false
end
end
$game_map.refresh if map_id == $game_map.map_id
end
#--------------------------------------------------------------------------
# ● 맵내의 지정명을 포함한 이벤트의 전셀프 스윗치 일괄 온
# map_id : 맵의 ID
# key : 셀프 스윗치("A"와 같이 지정)
# name : 이벤트명에 포함되는 문자열
#--------------------------------------------------------------------------
def map_allself_name_true(map_id, key, name)
map = load_data(sprintf("Data/Map%03d.rvdata", map_id))
events = []
for i in map.events.keys
events[i] = Game_Event.new(map_id, map.events[i])
end
for event in events
next if event == nil
id = event.id
if event.name.include?(name) && !$game_self_switches[[map_id, id, key]]
$game_self_switches[[map_id, id, key]] = true
end
end
$game_map.refresh if map_id == $game_map.map_id
end
#--------------------------------------------------------------------------
# ● 맵내의 지정명을 포함한 이벤트의 전셀프 스윗치 일괄 오프
# map_id : 맵의 ID
# key : 셀프 스윗치("A"와 같이 지정)
# name : 이벤트명에 포함되는 문자열
#--------------------------------------------------------------------------
def map_allself_name_false(map_id, key, name)
map = load_data(sprintf("Data/Map%03d.rvdata", map_id))
events = []
for i in map.events.keys
events[i] = Game_Event.new(map_id, map.events[i])
end
for event in events
next if event == nil
id = event.id
if event.name.include?(name) && $game_self_switches[[map_id, id, key]]
$game_self_switches[[map_id, id, key]] = false
end
end
$game_map.refresh if map_id == $game_map.map_id
end
#--------------------------------------------------------------------------
# ● 지정 위치의 이벤트의 셀프 스윗치를 온
# x : 지정 위치의 x 좌표
# y : 지정 위치의 y 좌표
# key : 셀프 스윗치("A"와 같이 지정)
#--------------------------------------------------------------------------
def pos_event_self_true(x, y ,key)
for event in $game_map.events_xy(x, y)
$game_self_switches[[$game_map.map_id, event.id, key]] = true
end
$game_map.refresh
end
#--------------------------------------------------------------------------
# ● 지정 위치의 이벤트의 셀프 스윗치를 오프
# x : 지정 위치의 x 좌표
# y : 지정 위치의 y 좌표
# key : 셀프 스윗치("A"와 같이 지정)
#--------------------------------------------------------------------------
def pos_event_self_false(x, y ,key)
for event in $game_map.events_xy(x, y)
$game_self_switches[[$game_map.map_id, event.id, key]] = false
end
$game_map.refresh
end
#--------------------------------------------------------------------------
# ● 지정 위치의 이벤트의 셀프 스윗치를 역전
# x : 지정 위치의 x 좌표
# y : 지정 위치의 y 좌표
# key : 셀프 스윗치("A"와 같이 지정)
#--------------------------------------------------------------------------
def pos_event_self_rev(x, y ,key)
for event in $game_map.events_xy(x, y)
$game_self_switches[[$game_map.map_id, event.id, key]] ^= true
end
$game_map.refresh
end
end
#==============================================================================
# ■ Game_Event
#==============================================================================
class Game_Event < Game_Character
#--------------------------------------------------------------------------
# ■ 이벤트명의 취득
#--------------------------------------------------------------------------
def name
return @event.name
end
end