Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Bugged Day and Night cycles?
Thorack
post Feb 24 2012, 08:28 PM
Post #1



Group Icon

Group: Member
Posts: 4
Type: None
RM Skill: Beginner




I followed a Day and Night cycle tutorial now when ever the time of day changes with in a battle the battle ends and the enemy is killed. Can anyone help me out here? I used this tutorial.

http://rmxp.tigerseye.uk.com/tutorial_esystem2.shtml

Its the only one that works so far. dry.gifsleep.gif

Thanks.
Go to the top of the page
 
+Quote Post
   
Jens of Zanicuud
post Feb 25 2012, 12:55 AM
Post #2


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 916
Type: Scripter
RM Skill: Skilled
Rev Points: 120




This is a RMXP default setting. When a timer expires, the battle automatically ends.
To fix it, go to script and look for:

Scene_Battle 1

line 272:
CODE
if $game_system.timer_working and $game_system.timer == 0
      # abort battle
      $game_temp.battle_abort = true
    end


then replace it with this:

CODE
if $game_system.timer_working and $game_system.timer == 0
   common_event = $data_common_event[COMMON_EVENT_ID]
   $game_system.battle_interpreter.setup(common_event.list, 0)
   $game_system.timer = DAY_DURATION_IN_SECONDS * Graphics.frame_rate
   $game_system.timer_working = true
end


Replace DAY_DURATION_IN_SECONDS with the number of seconds your timer should display when activated again.
Replace COMMON_EVENT_ID with the TimeOfDayChange common event id.

and remove the lines above. This way, your timer won't cause the battle ending.
Moreover, screen will keep on changing its tint every cycle.

Tell me if it worked...
I hope this can help.

Jens

This post has been edited by Jens of Zanicuud: Feb 25 2012, 12:57 AM


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   
Thorack
post Feb 25 2012, 02:10 AM
Post #3



Group Icon

Group: Member
Posts: 4
Type: None
RM Skill: Beginner




I thought there was something like that in the scripts, i'll try it when I get some free time. Thanks for the help by the way smile.gif
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th June 2013 - 10:30 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker