Mundo Maker
¡Bienvenid@ a Mundo Maker!

¿Quieres aprender todo sobre el RPG Maker?



Regístrate y forma parte de Mundo Maker.

(RMVX) 2 Scripts muy buenos,DIA/NOCHE y 2 Players

Ver el tema anterior Ver el tema siguiente Ir abajo

(RMVX) 2 Scripts muy buenos,DIA/NOCHE y 2 Players

Mensaje por jugito08 el 2010-01-29, 02:52

(CAPAZ ME ALLA COMIDO UNAS ``R´´,mi R esta rota -.- xD)(no se preocupen que los scipts no los cree yo xD)
Hola,este es mi primer aporte Very Happy .

Aca les traigo dos scripts:
DIA/NOCHE:
Ese script nos permitira a ver oscureser y amaneser(me parese que es cada 30 minutos).

Código:
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/ ? Day-to-Night Phases - KGC_DayNight ? VX ?
#_/ ? Last Update: 02/15/09 ?
#_/ ? Translated by Mr. Anonymous ?
#_/ ? KGC Site: ?
#_/ ? http://ytomy.sakura.ne.jp/ ?
#_/ ? Translator's Blog: ?
#_/ ? http://mraprojects.wordpress.com ?
#_/----------------------------------------------------------------------------
#_/ This script adds the concept of Day-to-Night phase shifting to your game.
#_/ Events that only occur during certain phase shifts, such as night, can be
#_/ created as well.
#_/============================================================================
#_/ Note: The event command "Tint Screen" doesn't function normally while this
#_/ script is running a phase shift. To use the Tint Screen function properly,
#_/ please refer to the directions.
#_/============================================================================
#_/ Installation: Insert above Main.
#_/----------------------------------------------------------------------------
#_/ Terminology: Phase refers to the current state of the day, such as "Noon".
#_/ ? Instructions For Usage ?
#_/
#_/ ? Stop Day-to-Night ?
#_/ When [DN_STOP] is inserted into a Map's name (after its given name), the
#_/ Day-to-Night change stops, the timer does not stop however, and if a phase
#_/ is currently active, such as "Night", the tint remains on the map.
#_/
#_/ ? Stop Day-to-Night and Time, Cancel Phase ?
#_/
#_/ When [DN_VOID] is inserted into a Map's name (after its given name), the
#_/ Day-to-Night change stops, the timer is effectively frozen, and if a phase
#_/ is currently active, such as "Night", the tint is reverted back to normal.
#_/
#_/ ? Phase-Specific Encounters ?
#_/
#_/ When [DN Phase#](Where Phase# refers to the phase. 0 = Noon, 1 = Evening,
#_/ 2 = Night, 3 = Morning) is inserted into a specified Troop's "Notes" box
#_/ in the Troops tab of the database, the specified Troop will only appear
#_/ under those conditions.
#_/
#_/ ? Event Script Functions ?
#_/ The following commands are available using the "Script" item in events.
#_/
#_/ * stop_daynight
#_/ Day to Night change is stopped.
#_/
#_/ * start_daynight
#_/ Day to Night change is started.
#_/
#_/ * get_daynight_name
#_/ Name of present phase is acquired. This function only works in other
#_/ scripts.
#_/
#_/ * get_daynight_week (variable_id)
#_/ Appoints the day of the week to the given variable.
#_/
#_/ * get_daynight_week_name
#_/ Name of the present day is aquired. This function only works in other
#_/ scripts.
#_/
#_/ * change_daynight_phase(phase, duration, pass_days)
#_/ Changes the current phase to a new one. Handy for Inns and the like.
#_/ Example: change_daynight_phase (3, 1, 1)
#_/ This would make one day pass, change the phase to morning, with a
#_/ duration of one frame. Duration must be set to a minimum of 1.
#_/
#_/ * transit_daynight_phase(duration)
#_/ Forces the phase to change at the very moment you call this.
#_/ This appears to be bugged. No matter how I've called it, I get errors.
#_/
#_/ * set_daynight_default(duration)
#_/ Forces the tint of the current phase to reset to the initial phase.
#_/
#_/ * restore_daynight_phase(duration)
#_/ Forces the tint of the current phase to reset to its normal tint.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

#=============================================================================#
# ? Customization ? #
#=============================================================================#

module KGC
module DayNight
# ? Day to Night Switch Method ?
# 0. Time Lapse 1.Time passes with number of steps 2.Real Time
METHOD = 1

# ? Phase Variable ?
# The present phase (of day and night) is stored here.
PHASE_VARIABLE = 11

# ? Passing Days Storage Variable ?
# The passing days is stored here.
PASS_DAYS_VARIABLE = 12

# ? Stop On Event Toggle ?
# Stops the Day/Night Timer when an event is run by player.
STOP_ON_EVENT = false

# ? Day/Night Tone In Battle ?
# 0: None 1: Only Background 2: Background + Enemies
BG_TONE_IN_BATTLE = 0

# ? Setting Individual Phases ?
# Each phase makes use of the Tint Screen function. The format as follows:
# ["Name", the color tone(Tint), time switch],
#
# [Name]
# Name of Phase
# *The name holds no significance.
# [Tint]
# The color tone of the entire screen.
# Please don't alter this if you don't grasp color tints.
# [Time Shift]
# The amount of steps taken until the next phase shift occurs.
# The following set up is for step-time change. (METHOD = 1)
#
# Simplified Example:
# ["Noon", Tone.new( 0, 0, 0), 300], # Phase 0
# ["Evening", Tone.new( -32, -96, -96), 100], # Phase 1
# ["Night", Tone.new(-128, -128, -32), 250], # Phase 2
# ["Morning", Tone.new( -48, -48, -16), 100], # Phase 3
#
PHASE = [
# Name Tint Time Shift
["Noon", Tone.new( 0, 0, 0), 300], # Phase 0
["Evening", Tone.new( -32, -64, -96), 175], # Phase 1
["Night", Tone.new(-128, -128, -32), 200], # Phase 2
["MidNight", Tone.new(-164, -164, -64), 150], # Phase 3
["Daybreak", Tone.new( -64, -64, 32), 200], # Phase 4
["Morning", Tone.new( -32, -48, 16), 75], # Phase 5
] # Do not remove this line!

# ? Real Time Setup ?
# Replace the values in the about phase set-up if you wish to use real-time.
# This is only a template and may be altered freely.
# ["Noon", Tone.new( 0, 0, 0), 12], #Phase0 (Hour 12 [12:00PM])
# ["Evening", Tone.new( -32, -64, -96), 18], #Phase1 (Hour 18 [6:00PM] )
# ["Night", Tone.new(-128, -128, -32), 20], #Phase2 (Hour 20 [8:00PM] )
# ["MidNight", Tone.new(-164, -164, -64), 0], #Phase3 (Hour 0 [12:00AM])
# ["Daybreak", Tone.new( -64, -64, 32), 5], #Phase4 (Hour 5 [5:00AM] )
# ["Morning", Tone.new( -32, -48, 16), 7], #Phase5 (Hour 7 [7:00AM] )

# ? Real Time Setup Simplified ?
# ["Noon", Tone.new( 0, 0, 0), 16], #Phase0 (16 o'clock [4:00PM])
# ["Evening", Tone.new( 0, -96, -96), 20], #Phase1 (20 o'clock [8:00PM])
# ["Night", Tone.new(-96, -96, -64), 6], #Phase2 (6 o'clock [6:00AM])
# ["Morning", Tone.new(-48, -48, -16), 10], #Phase3 (10 o'clock [10:00AM])

# ? Day Change ?
# The day changes on the phase set here.
# 0.Day 1.Evening 2.Night 3. MidNight 4.Daybreak 5.Morning
PASS_DAY_PHASE = 3

# ? Fade Time (by frame) ?
# The amount of frames it takes to fade into the next phase.
PHASE_DURATION = 536

# ? Day of the Week Names ?
# This shouldn't be hard to figure out, I hope.
# When using the Real-Time method (2), this must be seven days.
# Values of these are 0, 1, 2, 3, 4, 5, 6
WEEK_NAME = ["Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat"]
end
end

#==============================================================================#
# ? END Customization ? #
#==============================================================================#

$imported = {} if $imported == nil
$imported["DayNight"] = true

#------------------------------------------------------------------------------#

if $data_mapinfos == nil
$data_mapinfos = load_data("Data/MapInfos.rvdata")
end

#------------------------------------------------------------------------------#

module KGC::DayNight
BATTLE_TONE_NONE = 0 # Tone In Battle: None
BATTLE_TONE_BG = 1 # Tone In Battle: Background
BATTLE_TONE_FULL = 2 # Tone In Battle: Background + Enemies

METHOD_TIME = 0 # Time Lapse
METHOD_STEP = 1 # Time passes with number of steps
METHOD_RTIME = 2 # Real Time

# Whatever word(s) in the following lines are what are used to determine
# what is searched for in the Map Name or the "Notes" section of the database.

# Regular Expression Defined
module Regexp
# MapInfo Module
module MapInfo
# Day/Night Stop tag string
DAYNIGHT_STOP = /\[DN_STOP\]/i
# Day/Night Void tag string
DAYNIGHT_VOID = /\[DN_VOID\]/i
end

# Event Module
module Event
#Light Emission tag string
LUMINOUS = /\[(?:LUMINOUS|light)\]/i
end

# Troop Module
module Troop
# Appearance Phase tag string
APPEAR_PHASE = /\[DN((?:[ ]*[\-]?\d+(?:[ ]*,)?)+)\]/i
end
end

#--------------------------------------------------------------------------
# ? ?????????
# troop : ??????????
# phase : ????????
#--------------------------------------------------------------------------
def self.troop_appear?(troop, phase = $game_system.daynight_phase)
# ????
unless troop.appear_daynight_phase.empty?
return false unless troop.appear_daynight_phase.include?(phase)
end
# ?????
unless troop.nonappear_daynight_phase.empty?
return false if troop.nonappear_daynight_phase.include?(phase)
end

return true
end
end

#???????????????????????????????????????

#==============================================================================
# ? KGC::Commands
#==============================================================================

module KGC
module Commands
module_function
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def stop_daynight
$game_system.daynight_change_enabled = false
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def start_daynight
$game_system.daynight_change_enabled = true
end
#--------------------------------------------------------------------------
# ? ???????????
#--------------------------------------------------------------------------
def get_daynight_name
return KGC::DayNight::PHASE[get_daynight_phase][0]
end
#--------------------------------------------------------------------------
# ? ????????
# variable_id : ?????? ID
#--------------------------------------------------------------------------
def get_daynight_week(variable_id = 0)
if KGC::DayNight::METHOD == KGC::DayNight::METHOD_RTIME
week = Time.now.wday
else
days = $game_variables[KGC::DayNight::PASS_DAYS_VARIABLE]
week = (days % KGC::DayNight::WEEK_NAME.size)
end

if variable_id > 0
$game_variables[variable_id] = week
$game_map.need_refresh = true
end
return week
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def get_daynight_week_name
return KGC::DayNight::WEEK_NAME[get_daynight_week]
end
#--------------------------------------------------------------------------
# ? ????????
# phase : ??????????
# duration : ??????(????)
# pass_days : ??????? (???: 0)
#--------------------------------------------------------------------------
def change_daynight_phase(phase,
duration = KGC::DayNight::PHASE_DURATION,
pass_days = 0)
$game_temp.manual_daynight_duration = duration
$game_system.daynight_counter = 0
$game_system.daynight_phase = phase
$game_variables[KGC::DayNight::PASS_DAYS_VARIABLE] += pass_days
$game_map.need_refresh = true
end
#--------------------------------------------------------------------------
# ? ?????????
# duration : ??????(????)
#--------------------------------------------------------------------------
def transit_daynight_phase(duration = KGC::DayNight::PHASE_DURATION)
$game_screen.transit_daynight_phase(duration)
$game_map.need_refresh = true
end
#--------------------------------------------------------------------------
# ? ???????????
# duration : ??????(????)
#--------------------------------------------------------------------------
def set_daynight_default(duration = KGC::DayNight::PHASE_DURATION)
$game_screen.set_daynight_default(duration)
$game_map.need_refresh = true
end
#--------------------------------------------------------------------------
# ? ??????????
# duration : ??????(????)
#--------------------------------------------------------------------------
def restore_daynight_phase(duration = KGC::DayNight::PHASE_DURATION)
$game_screen.restore_daynight_phase(duration)
$game_map.need_refresh = true
end
end
end

class Game_Interpreter
include KGC::Commands
end

#???????????????????????????????????????

#==============================================================================
# ¦ RPG::MapInfo
#==============================================================================

class RPG::MapInfo
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def name
return @name.gsub(/\[.*\]/) { "" }
end
#--------------------------------------------------------------------------
# ? ???????????
#--------------------------------------------------------------------------
def original_name
return @name
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def daynight_stop
return @name =~ KGC::DayNight::Regexp::MapInfo::DAYNIGHT_STOP
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def daynight_void
return @name =~ KGC::DayNight::Regexp::MapInfo::DAYNIGHT_VOID
end
end

#???????????????????????????????????????

#==============================================================================
# ¦ RPG::Area
#==============================================================================

unless $@
class RPG::Area
#--------------------------------------------------------------------------
# ? ????????????
#--------------------------------------------------------------------------
alias encounter_list_KGC_DayNight encounter_list
def encounter_list
list = encounter_list_KGC_DayNight.clone

# ??????
list.each_index { |i|
list[i] = nil unless KGC::DayNight.troop_appear?($data_troops[list[i]])
}
return list.compact
end
end
end

#???????????????????????????????????????

#==============================================================================
# ¦ RPG::Troop
#==============================================================================

class RPG::Troop
#--------------------------------------------------------------------------
# ? ??????????????
#--------------------------------------------------------------------------
def create_daynight_cache
@__appear_daynight_phase = []
@__nonappear_daynight_phase = []

# ????????
if @name =~ KGC::DayNight::Regexp::Troop::APPEAR_PHASE
$1.scan(/[\-]?\d+/).each { |num|
phase = num.to_i
if phase < 0
# ?????
@__nonappear_daynight_phase << phase.abs
else
# ????
@__appear_daynight_phase << phase
end
}
end
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def appear_daynight_phase
create_daynight_cache if @__appear_daynight_phase == nil
return @__appear_daynight_phase
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def nonappear_daynight_phase
create_daynight_cache if @__nonappear_daynight_phase == nil
return @__nonappear_daynight_phase
end
end

#???????????????????????????????????????

#==============================================================================
# ¦ Game_Temp
#==============================================================================

class Game_Temp
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
attr_accessor :manual_daynight_duration # ???????????
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
alias initialize_KGC_DayNight initialize
def initialize
initialize_KGC_DayNight

@manual_daynight_duration = nil
end
end

#???????????????????????????????????????

#==============================================================================
# ¦ Game_System
#==============================================================================

class Game_System
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
attr_writer :daynight_counter # ??????????
attr_writer :daynight_change_enabled # ????????
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
alias initialize_KGC_DayNight initialize
def initialize
initialize_KGC_DayNight

@daynight_counter = 0
@daynight_change_enabled = true
end
#--------------------------------------------------------------------------
# ? ?????????????
#--------------------------------------------------------------------------
def daynight_counter
@daynight_counter = 0 if @daynight_counter == nil
return @daynight_counter
end
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
def daynight_phase
return $game_variables[KGC::DayNight::PHASE_VARIABLE]
end
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
def daynight_phase=(value)
$game_variables[KGC::DayNight::PHASE_VARIABLE] = value
$game_map.need_refresh = true
end
#--------------------------------------------------------------------------
# ? ??????????????
#--------------------------------------------------------------------------
def daynight_change_enabled
@daynight_change_enabled = 0 if @daynight_change_enabled == nil
return @daynight_change_enabled
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def progress_daynight_phase
self.daynight_phase += 1
if self.daynight_phase >= KGC::DayNight::PHASE.size
self.daynight_phase = 0
end
$game_map.need_refresh = true
end
#--------------------------------------------------------------------------
# ? ????????????????
#--------------------------------------------------------------------------
def daynight_phase_object
return KGC::DayNight::PHASE[daynight_phase]
end
#--------------------------------------------------------------------------
# ? ????????????????
#--------------------------------------------------------------------------
def previous_daynight_phase_object
return KGC::DayNight::PHASE[daynight_phase - 1]
end
end

#???????????????????????????????????????

#==============================================================================
# ¦ Game_Screen
#==============================================================================

class Game_Screen
DEFAULT_TONE = Tone.new(0, 0, 0)
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
attr_reader :daynight_tone # ?????
#--------------------------------------------------------------------------
# ? ???
#--------------------------------------------------------------------------
alias clear_KGC_DayNight clear
def clear
clear_KGC_DayNight

clear_daynight
end
#--------------------------------------------------------------------------
# ? ?????????????
#--------------------------------------------------------------------------
def clear_daynight
@daynight_tone = DEFAULT_TONE.clone
@daynight_x = 0
@daynight_y = 0

@frame_count = Graphics.frame_count
@daynight_tone_duration = 0

apply_daynight
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def apply_daynight
return if $game_map == nil
if $game_temp.in_battle
if KGC::DayNight::BG_TONE_IN_BATTLE == KGC::DayNight::BATTLE_TONE_NONE
return
end
end

# ????????????????
if $game_map.daynight_void?
if @daynight_tone_changed
# ????????
@tone = DEFAULT_TONE.clone
@daynight_tone_changed = false
end
@daynight_tone = @tone.clone
return
end

# ?????????????
if $game_system.daynight_phase_object == nil
$game_system.daynight_phase = 0
end

# ????????
@tone = $game_system.daynight_phase_object[1].clone
@daynight_tone = @tone.clone

# ?????????
if KGC::DayNight::METHOD == KGC::DayNight::METHOD_RTIME
time = Time.now
# ????????????
KGC::DayNight::PHASE.each_with_index { |phase, i|
if phase[2] <= time.hour
start_tone_change(phase[1], 1)
$game_system.daynight_phase = i
break
end
}
end

@daynight_tone_changed = true
end
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def tone
if $game_temp.in_battle
if KGC::DayNight::BG_TONE_IN_BATTLE <= KGC::DayNight::BATTLE_TONE_BG
return DEFAULT_TONE
end
end
return @tone
end
#--------------------------------------------------------------------------
# ? ???????
# tone : ??
# duration : ??
#--------------------------------------------------------------------------
alias start_tone_change_KGC_DayNight start_tone_change
def start_tone_change(tone, duration)
duration = [duration, 1].max
start_tone_change_KGC_DayNight(tone, duration)

@daynight_tone_target = tone.clone
@daynight_tone_duration = duration
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
alias update_KGC_DayNight update
def update
update_KGC_DayNight

update_daynight_transit
end
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
alias update_tone_KGC_DayNight update_tone
def update_tone
update_tone_KGC_DayNight

if @daynight_tone_duration >= 1
d = @daynight_tone_duration
target = @daynight_tone_target
@daynight_tone.red = (@daynight_tone.red * (d - 1) + target.red) / d
@daynight_tone.green = (@daynight_tone.green * (d - 1) + target.green) / d
@daynight_tone.blue = (@daynight_tone.blue * (d - 1) + target.blue) / d
@daynight_tone.gray = (@daynight_tone.gray * (d - 1) + target.gray) / d
@daynight_tone_duration -= 1
end
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def update_daynight_transit
# ?????????????
if $game_temp.manual_daynight_duration
start_tone_change($game_system.daynight_phase_object[1],
$game_temp.manual_daynight_duration)
$game_temp.manual_daynight_duration = nil
@daynight_tone_changed = true
end

return unless $game_system.daynight_change_enabled # ?????
return if $game_map.daynight_stop? # ???

if KGC::DayNight::STOP_ON_EVENT
interpreter = ($game_temp.in_battle ? $game_troop.interpreter :
$game_map.interpreter)
return if interpreter.running? # ???????
end

case KGC::DayNight::METHOD
when KGC::DayNight::METHOD_TIME # ??
update_daynight_pass_time
when KGC::DayNight::METHOD_STEP # ??
update_daynight_step
when KGC::DayNight::METHOD_RTIME # ????
update_daynight_real_time
end
end
#--------------------------------------------------------------------------
# ? ?? : ????
#--------------------------------------------------------------------------
def update_daynight_pass_time
# ?????????
inc_count = Graphics.frame_count - @frame_count
# ?????????????
if inc_count >= 100
@frame_count = Graphics.frame_count
return
end
# ??????
$game_system.daynight_counter += inc_count
@frame_count = Graphics.frame_count

# ??????
count = $game_system.daynight_counter / Graphics.frame_rate
if count >= $game_system.daynight_phase_object[2]
transit_daynight_next
end
end
#--------------------------------------------------------------------------
# ? ?? : ??
#--------------------------------------------------------------------------
def update_daynight_step
# ???????????
return if @daynight_x == $game_player.x && @daynight_y == $game_player.y

@daynight_x = $game_player.x
@daynight_y = $game_player.y
# ??????
$game_system.daynight_counter += 1
# ??????
count = $game_system.daynight_counter
if count >= $game_system.daynight_phase_object[2]
transit_daynight_next
end
end
#--------------------------------------------------------------------------
# ? ?? : ????
#--------------------------------------------------------------------------
def update_daynight_real_time
time = Time.now
# ??????
time1 = $game_system.daynight_phase_object[2]
transit = (time1 <= time.hour)
if $game_system.previous_daynight_phase_object != nil
time2 = $game_system.previous_daynight_phase_object[2]
if time1 < time2
transit &= (time.hour < time2)
end
end

if transit
transit_daynight_next
end
end
#--------------------------------------------------------------------------
# ? ???????
# duration : ????
#--------------------------------------------------------------------------
def transit_daynight_next(duration = KGC::DayNight::PHASE_DURATION)
$game_system.daynight_counter = 0
$game_system.progress_daynight_phase
# ??????
if $game_system.daynight_phase == KGC::DayNight::PASS_DAY_PHASE
$game_variables[KGC::DayNight::PASS_DAYS_VARIABLE] += 1
end
# ??????
start_tone_change($game_system.daynight_phase_object[1], duration)
@daynight_tone_changed = true
end
#--------------------------------------------------------------------------
# ? ????????(0, 0, 0)???
# duration : ????
#--------------------------------------------------------------------------
def set_daynight_default(duration)
start_tone_change(DEFAULT_TONE, duration)
end
#--------------------------------------------------------------------------
# ? ??????????
# duration : ????
#--------------------------------------------------------------------------
def restore_daynight_phase(duration)
start_tone_change($game_system.daynight_phase_object[1], duration)
@daynight_tone_changed = true
end
end

#???????????????????????????????????????

#==============================================================================
# ¦ Game_Map
#==============================================================================

class Game_Map
#--------------------------------------------------------------------------
# ? ??????
# map_id : ??? ID
#--------------------------------------------------------------------------
alias setup_KGC_DayNight setup
def setup(map_id)
setup_KGC_DayNight(map_id)

@screen.apply_daynight
end
#--------------------------------------------------------------------------
# ? ????????????
#--------------------------------------------------------------------------
def daynight_stop?
info = $data_mapinfos[map_id]
return false if info == nil
return (info.daynight_stop || info.daynight_void)
end
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
def daynight_void?
info = $data_mapinfos[map_id]
return false if info == nil
return info.daynight_void
end
#--------------------------------------------------------------------------
# ? ????????????
#--------------------------------------------------------------------------
alias encounter_list_KGC_DayNight encounter_list
def encounter_list
list = encounter_list_KGC_DayNight.clone

# ??????
list.each_index { |i|
list[i] = nil unless KGC::DayNight.troop_appear?($data_troops[list[i]])
}
return list.compact
end
end

#???????????????????????????????????????

#==============================================================================
# ¦ Game_Character
#==============================================================================

class Game_Character
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def luminous?
return false
end
end

#???????????????????????????????????????

#==============================================================================
# ¦ Game_Event
#==============================================================================

class Game_Event < Game_Character
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def luminous?
return (@event.name =~ KGC::DayNight::Regexp::Event::LUMINOUS)
end
end

#???????????????????????????????????????

#==============================================================================
# ¦ Spriteset_Map
#==============================================================================

class Spriteset_Map
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
alias create_viewports_KGC_DayNight create_viewports
def create_viewports
create_viewports_KGC_DayNight

@viewport1_2 = Viewport.new(0, 0,
@viewport1.rect.width, @viewport1.rect.height)
end
#--------------------------------------------------------------------------
# ? ??????????????
#--------------------------------------------------------------------------
alias create_characters_KGC_DayNight create_characters
def create_characters
create_characters_KGC_DayNight

# ????????? @viewport1_2 ???
@character_sprites.each { |sprite|
sprite.viewport = @viewport1_2 if sprite.character.luminous?
}
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
alias dispose_viewports_KGC_DayNight dispose_viewports
def dispose_viewports
dispose_viewports_KGC_DayNight

@viewport1_2.dispose
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
alias update_viewports_KGC_DayNight update_viewports
def update_viewports
update_viewports_KGC_DayNight

@viewport1_2.ox = $game_map.screen.shake
@viewport1_2.update
end
end

#???????????????????????????????????????

#==============================================================================
# ¦ Spriteset_Battle
#==============================================================================

if KGC::DayNight::BG_TONE_IN_BATTLE == KGC::DayNight::BATTLE_TONE_BG

class Spriteset_Battle
#--------------------------------------------------------------------------
# ? ??????????????
#--------------------------------------------------------------------------
alias create_battleback_KGC_DayNight create_battleback
def create_battleback
create_battleback_KGC_DayNight

if @battleback_sprite.wave_amp == 0
@battleback_sprite.tone = $game_troop.screen.daynight_tone
end
end
#--------------------------------------------------------------------------
# ? ??????????????
#--------------------------------------------------------------------------
alias create_battlefloor_KGC_DayNight create_battlefloor
def create_battlefloor
create_battlefloor_KGC_DayNight

@battlefloor_sprite.tone = $game_troop.screen.daynight_tone
end
end

end # <== if KGC::DayNight::BG_TONE_IN_BATTLE == KGC::DayNight::BATTLE_TONE_BG

#???????????????????????????????????????

#==============================================================================
# ¦ Scene_Map
#==============================================================================

class Scene_Map < Scene_Base
#--------------------------------------------------------------------------
# ? ????
#--------------------------------------------------------------------------
alias start_KGC_DayNight start
def start
$game_map.screen.clear_daynight

start_KGC_DayNight
end
end

2 Players:
Este es uno muy bueno,te permitira jugar de a 2.

INSTRUCCIONES

Copia esto:
$game_player2 = Game_Player2.new
$game_player2.create(x, y, actor id, follow?)
y peguenlo en: casilla 3>avanzado>llamar script.

en la segunda linea de eso, editad lo sguiente: (x, y, actor id, follow?)

x, y = poned la coordenada donde quieran que aparezca el player 2.
actor id = el número del personaje; ejemplo: si el actor es el 1 (por defecto), pongan el 2, 3, 4, etc...
follow? = pongan true si quieren que la pantalla siga al player 2; pongan false si no lo quereis.
**SE RECOMIENDA PONER false***

Código:
=begin

+[FEATURES]+
- Create Player 2 that you can control, interact with other events in map,
as same as Main Player.

- Editable Input Buttons for Player 2

- Player 2 can walk & Run 8 directions

+[HOW TO USE]+
To Create Player 2, use call script:
$game_player2 = Game_Player2.new
$game_player2.create(x, y, actor id, follow?)

x and y = X and Y that you want new player to appear

actor id = Character from ID of Actor that you want to use for new player
(ID from Database)

follow? = true (Screen follow new player), false (not follow new player)
*NOT RECOMMEND TO USE FOLLOW*

To Delete Player 2, use call script:
$game_player2.delete

=end
#==============================================================================

class Game_Player2 < Game_Character
#--------------------------------------------------------------------------
# START SETUP SCRIPT PART
# * Constants: INPUT BUTTONS FOR Game_Player 2
#--------------------------------------------------------------------------
DOWN = Input::Y # S in Keyboard
LEFT = Input::X # A in Keyboard
RIGHT = Input::Z # D in Keyboard
UP = Input::R # W in Keyboard
ENTER = Input::L # Q in Keyboard
RUN = Input::A # Shift in Keyboard
#--------------------------------------------------------------------------
# END SETUP SCRIPT PART
#--------------------------------------------------------------------------

CENTER_X = (544 / 2 - 16) * 8 # Screen center X coordinate * 8
CENTER_Y = (416 / 2 - 16) * 8 # Screen center Y coordinate * 8
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :vehicle_type # type of vehicle currenting being ridden
attr_accessor :character_name
#--------------------------------------------------------------------------
# * Create and Set Player 2 Location
#--------------------------------------------------------------------------
def create(x,y,id,need_center = false)
@actor_id = id
moveto(x,y)
@need_center = need_center
refresh
end
#--------------------------------------------------------------------------
# * Clear Player 2
#--------------------------------------------------------------------------
def delete
@actor_id = nil
refresh
$game_player2 = nil
end
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super
@vehicle_type = -1
@vehicle_getting_on = false # Boarding vehicle flag
@vehicle_getting_off = false # Getting off vehicle flag
@transferring = false # Player transfer flag
@new_map_id = 0 # Destination map ID
@new_x = 0 # Destination X coordinate
@new_y = 0 # Destination Y coordinate
@new_direction = 0 # Post-movement direction
@walking_bgm = nil # For walking BGM memory
end
#--------------------------------------------------------------------------
# * Determine if Stopping
#--------------------------------------------------------------------------
def stopping?
return false if @vehicle_getting_on
return false if @vehicle_getting_off
return super
end
#--------------------------------------------------------------------------
# * Player Transfer Reservation
# map_id : Map ID
# x : x-coordinate
# y : y coordinate
# direction : post-movement direction
#--------------------------------------------------------------------------
def reserve_transfer(map_id, x, y, direction)
@transferring = true
@new_map_id = map_id
@new_x = x
@new_y = y
@new_direction = direction
end
#--------------------------------------------------------------------------
# * Determine if Player Transfer is Reserved
#--------------------------------------------------------------------------
def transfer?
return @transferring
end
#--------------------------------------------------------------------------
# * Execute Player Transfer
#--------------------------------------------------------------------------
def perform_transfer
return unless @transferring
@transferring = false
set_direction(@new_direction)
if $game_map.map_id != @new_map_id
$game_map.setup(@new_map_id) # Move to other map
end
moveto(@new_x, @new_y)
end
#--------------------------------------------------------------------------
# * Determine if Map is Passable
# x : x-coordinate
# y : y-coordinate
#--------------------------------------------------------------------------
def map_passable?(x, y)
case @vehicle_type
when 0 # Boat
return $game_map.boat_passable?(x, y)
when 1 # Ship
return $game_map.ship_passable?(x, y)
when 2 # Airship
return true
else # Walking
return $game_map.passable?(x, y)
end
end
#--------------------------------------------------------------------------
# * Determine if Walking is Possible
# x : x-coordinate
# y : y-coordinate
#--------------------------------------------------------------------------
def can_walk?(x, y)
last_vehicle_type = @vehicle_type # Remove vehicle type
@vehicle_type = -1 # Temporarily set to walking
result = passable?(x, y) # Determine if passable
@vehicle_type = last_vehicle_type # Restore vehicle type
return result
end
#--------------------------------------------------------------------------
# * Determine if Airship can Land
# x : x-coordinate
# y : y-coordinate
#--------------------------------------------------------------------------
def airship_land_ok?(x, y)
unless $game_map.airship_land_ok?(x, y)
return false # The tile passable attribute is unlandable
end
unless $game_map.events_xy(x, y).empty?
return false # Cannot land where there is an event
end
return true # Can land
end
#--------------------------------------------------------------------------
# * Determine if Riding in Some Kind of Vehicle
#--------------------------------------------------------------------------
def in_vehicle?
return @vehicle_type >= 0
end
#--------------------------------------------------------------------------
# * Determine if Riding in Airship
#--------------------------------------------------------------------------
def in_airship?
return @vehicle_type == 2
end
#--------------------------------------------------------------------------
# * Determine if Dashing
#--------------------------------------------------------------------------
def dash?
return false if @move_route_forcing
return false if $game_map.disable_dash?
return false if in_vehicle?
return Input.press?(RUN)
end
#--------------------------------------------------------------------------
# * Determine if Debug Pass-through State
#--------------------------------------------------------------------------
def debug_through?
return false unless $TEST
return Input.press?(Input::CTRL)
end
#--------------------------------------------------------------------------
# * Set Map Display Position to Center of Screen
# x : x-coordinate
# y : y-coordinate
#--------------------------------------------------------------------------
def center(x, y)
display_x = x * 256 - CENTER_X # Calculate coordinates
unless $game_map.loop_horizontal? # No loop horizontally?
max_x = ($game_map.width - 17) * 256 # Calculate max value
display_x = [0, [display_x, max_x].min].max # Adjust coordinates
end
display_y = y * 256 - CENTER_Y # Calculate coordinates
unless $game_map.loop_vertical? # No loop vertically?
max_y = ($game_map.height - 13) * 256 # Calculate max value
display_y = [0, [display_y, max_y].min].max # Adjust coordinates
end
$game_map.set_display_pos(display_x, display_y) # Change map location
end
#--------------------------------------------------------------------------
# * Move to Designated Position
# x : x-coordinate
# y : y-coordinate
#--------------------------------------------------------------------------
def moveto(x, y)
super
# center(x, y)
make_encounter_count # Initialize encounter
if in_vehicle? # Riding in vehicle
vehicle = $game_map.vehicles[@vehicle_type] # Get vehicle
vehicle.refresh # Refresh
end
end
#--------------------------------------------------------------------------
# * Increase Steps
#--------------------------------------------------------------------------
def increase_steps
super
return if @move_route_forcing
return if in_vehicle?
$game_party.increase_steps
$game_party.on_player_walk
end
#--------------------------------------------------------------------------
# * Get Encounter Count
#--------------------------------------------------------------------------
def encounter_count
return @encounter_count
end
#--------------------------------------------------------------------------
# * Make Encounter Count
#--------------------------------------------------------------------------
def make_encounter_count
if $game_map.map_id != 0
n = $game_map.encounter_step
@encounter_count = rand(n) + rand(n) + 1 # As if rolling 2 dice
end
end
#--------------------------------------------------------------------------
# * Determine if in Area
# area : Area data (RPG::Area)
#--------------------------------------------------------------------------
def in_area?(area)
return false if area == nil
return false if $game_map.map_id != area.map_id
return false if @x < area.rect.x
return false if @y < area.rect.y
return false if @x >= area.rect.x + area.rect.width
return false if @y >= area.rect.y + area.rect.height
return true
end
#--------------------------------------------------------------------------
# * Create Group ID for Troop Encountered
#--------------------------------------------------------------------------
def make_encounter_troop_id
encounter_list = $game_map.encounter_list.clone
for area in $data_areas.values
encounter_list += area.encounter_list if in_area?(area)
end
if encounter_list.empty?
make_encounter_count
return 0
end
return encounter_list[rand(encounter_list.size)]
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
if @actor_id != nil and $game_actors[@actor_id] != nil
actor = $game_actors[@actor_id] # Get front actor
@character_name = actor.character_name
@character_index = actor.character_index
else
@character_name = ""
end
end
#--------------------------------------------------------------------------
# * Determine if Same Position Event is Triggered
# triggers : Trigger array
#--------------------------------------------------------------------------
def check_event_trigger_here(triggers)
return false if $game_map.interpreter.running?
result = false
for event in $game_map.events_xy(@x, @y)
if triggers.include?(event.trigger) and event.priority_type != 1
event.start
result = true if event.starting
end
end
return result
end
#--------------------------------------------------------------------------
# * Determine if Front Event is Triggered
# triggers : Trigger array
#--------------------------------------------------------------------------
def check_event_trigger_there(triggers)
return false if $game_map.interpreter.running?
result = false
front_x = $game_map.x_with_direction(@x, @direction)
front_y = $game_map.y_with_direction(@y, @direction)
for event in $game_map.events_xy(front_x, front_y)
if triggers.include?(event.trigger) and event.priority_type == 1
event.start
result = true
end
end
if result == false and $game_map.counter?(front_x, front_y)
front_x = $game_map.x_with_direction(front_x, @direction)
front_y = $game_map.y_with_direction(front_y, @direction)
for event in $game_map.events_xy(front_x, front_y)
if triggers.include?(event.trigger) and event.priority_type == 1
event.start
result = true
end
end
end
return result
end
#--------------------------------------------------------------------------
# * Determine if Touch Event is Triggered
# x : x-coordinate
# y : y-coordinate
#--------------------------------------------------------------------------
def check_event_trigger_touch(x, y)
return false if $game_map.interpreter.running?
result = false
for event in $game_map.events_xy(x, y)
if [1,2].include?(event.trigger) and event.priority_type == 1
event.start
result = true
end
end
return result
end
#--------------------------------------------------------------------------
# * Processing of Movement via input from the Directional Buttons
#--------------------------------------------------------------------------
def move_by_input
return unless movable?
return if $game_map.interpreter.running?
if Input.press?(DOWN)
move_down
end
if Input.press?(LEFT)
move_left
end
if Input.press?(RIGHT)
move_right
end
if Input.press?(UP)
move_up
end
end
#--------------------------------------------------------------------------
# * Determine if Movement is Possible
#--------------------------------------------------------------------------
def movable?
return false if moving? # Moving
return false if @move_route_forcing # On forced move route
return false if @vehicle_getting_on # Boarding vehicle
return false if @vehicle_getting_off # Getting off vehicle
return false if $game_message.visible # Displaying a message
return false if in_airship? and not $game_map.airship.movable?
return true
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
last_real_x = @real_x
last_real_y = @real_y
last_moving = moving?
move_by_input
super
update_scroll(last_real_x, last_real_y) if @need_center
update_vehicle
update_nonmoving(last_moving)
end
#--------------------------------------------------------------------------
# * Update Scroll
#--------------------------------------------------------------------------
def update_scroll(last_real_x, last_real_y)
ax1 = $game_map.adjust_x(last_real_x)
ay1 = $game_map.adjust_y(last_real_y)
ax2 = $game_map.adjust_x(@real_x)
ay2 = $game_map.adjust_y(@real_y)
if ay2 > ay1 and ay2 > CENTER_Y
$game_map.scroll_down(ay2 - ay1)
end
if ax2 < ax1 and ax2 < CENTER_X
$game_map.scroll_left(ax1 - ax2)
end
if ax2 > ax1 and ax2 > CENTER_X
$game_map.scroll_right(ax2 - ax1)
end
if ay2 < ay1 and ay2 < CENTER_Y
$game_map.scroll_up(ay1 - ay2)
end
end
#--------------------------------------------------------------------------
# * Update Vehicle
#--------------------------------------------------------------------------
def update_vehicle
return unless in_vehicle?
vehicle = $game_map.vehicles[@vehicle_type]
if @vehicle_getting_on # Boarding?
if not moving?
@direction = vehicle.direction # Change direction
@move_speed = vehicle.speed # Change movement speed
@vehicle_getting_on = false # Finish boarding operation
@transparent = true # Transparency
end
elsif @vehicle_getting_off # Getting off?
if not moving? and vehicle.altitude == 0
@vehicle_getting_off = false # Finish getting off operation
@vehicle_type = -1 # Erase vehicle type
@transparent = false # Remove transparency
end
else # Riding in vehicle
vehicle.sync_with_player # Move at the same time as player
end
end
#--------------------------------------------------------------------------
# * Processing when not moving
# last_moving : Was it moving previously?
#--------------------------------------------------------------------------
def update_nonmoving(last_moving)
return if $game_map.interpreter.running?
return if moving?
return if check_touch_event if last_moving
if not $game_message.visible and Input.trigger?(ENTER)
return if get_on_off_vehicle
return if check_action_event
end
update_encounter if last_moving
end
#--------------------------------------------------------------------------
# * Update Encounter
#--------------------------------------------------------------------------
def update_encounter
return if $TEST and Input.press?(Input::CTRL) # During test play?
return if in_vehicle? # Riding in vehicle?
if $game_map.bush?(@x, @y) # If in bush
@encounter_count -= 2 # Reduce encounters by 2
else # If not in bush
@encounter_count -= 1 # Reduce encounters by 1
end
end
#--------------------------------------------------------------------------
# * Determine Event Start Caused by Touch (overlap)
#--------------------------------------------------------------------------
def check_touch_event
return false if in_airship?
return check_event_trigger_here([1,2])
end
#--------------------------------------------------------------------------
# * Determine Event Start Caused by [OK] Button
#--------------------------------------------------------------------------
def check_action_event
return false if in_airship?
return true if check_event_trigger_here([0])
return check_event_trigger_there([0,1,2])
end
#--------------------------------------------------------------------------
# * Getting On and Off Vehicles
#--------------------------------------------------------------------------
def get_on_off_vehicle
return false unless movable?
if in_vehicle?
return get_off_vehicle
else
return get_on_vehicle
end
end
#--------------------------------------------------------------------------
# * Board Vehicle
# Assumes that the player is not currently in a vehicle.
#--------------------------------------------------------------------------
def get_on_vehicle
front_x = $game_map.x_with_direction(@x, @direction)
front_y = $game_map.y_with_direction(@y, @direction)
if $game_map.airship.pos?(@x, @y) # Is it overlapping with airship?
get_on_airship
return true
elsif $game_map.ship.pos?(front_x, front_y) # Is there a ship in front?
get_on_ship
return true
elsif $game_map.boat.pos?(front_x, front_y) # Is there a boat in front?
get_on_boat
return true
end
return false
end
#--------------------------------------------------------------------------
# * Board Boat
#--------------------------------------------------------------------------
def get_on_boat
@vehicle_getting_on = true # Boarding flag
@vehicle_type = 0 # Set vehicle type
force_move_forward # Move one step forward
@walking_bgm = RPG::BGM::last # Memorize walking BGM
$game_map.boat.get_on # Boarding processing
end
#--------------------------------------------------------------------------
# * Board Ship
#--------------------------------------------------------------------------
def get_on_ship
@vehicle_getting_on = true # Board
@vehicle_type = 1 # Set vehicle type
force_move_forward # Move one step forward
@walking_bgm = RPG::BGM::last # Memorize walking BGM
$game_map.ship.get_on # Boarding processing
end
#--------------------------------------------------------------------------
# * Board Airship
#--------------------------------------------------------------------------
def get_on_airship
@vehicle_getting_on = true # Start boarding operation
@vehicle_type = 2 # Set vehicle type
@through = true # Passage ON
@walking_bgm = RPG::BGM::last # Memorize walking BGM
$game_map.airship.get_on # Boarding processing
end
#--------------------------------------------------------------------------
# * Get Off Vehicle
# Assumes that the player is currently riding in a vehicle.
#--------------------------------------------------------------------------
def get_off_vehicle
if in_airship? # Airship
return unless airship_land_ok?(@x, @y) # Can't land?
else # Boat/ship
front_x = $game_map.x_with_direction(@x, @direction)
front_y = $game_map.y_with_direction(@y, @direction)
return unless can_walk?(front_x, front_y) # Can't touch land?
end
$game_map.vehicles[@vehicle_type].get_off # Get off processing
if in_airship? # Airship
@direction = 2 # Face down
else # Boat/ship
force_move_forward # Move one step forward
@transparent = false # Remove transparency
end
@vehicle_getting_off = true # Start getting off operation
@move_speed = 4 # Return move speed
@through = false # Passage OFF
@walking_bgm.play # Restore walking BGM
make_encounter_count # Initialize encounter
end
#--------------------------------------------------------------------------
# * Force One Step Forward
#--------------------------------------------------------------------------
def force_move_forward
@through = true # Passage ON
move_forward # Move one step forward
@through = false # Passage OFF
end
end

class Scene_Title < Scene_Base
alias wor_twopla_scetit_cregam create_game_objects
def create_game_objects
wor_twopla_scetit_cregam
$game_player2 = nil
end
end

class Scene_Map < Scene_Base
alias wor_twopla_scemap_upd update
def update
wor_twopla_scemap_upd
$game_player2.update if $game_player2 != nil
end
end

class Spriteset_Map
alias wor_twopla_sprmap_crecha create_characters
alias wor_twopla_sprmap_updcha update_characters
def create_characters
wor_twopla_sprmap_crecha
@character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
@chara_two_pushed = false
end

def update_characters
if !(@chara_two_pushed) and $game_player2 != nil
@character_sprites.push(Sprite_Character.new(@viewport1, $game_player2))
@chara_two_pushed = true
elsif @chara_two_pushed and $game_player2 == nil
for i in 0..@character_sprites.size
if @character_sprites.character.is_a?(Game_Player2)
@character_sprites[i].character.character_name = ""
@character_sprites[i].update
@character_sprites.delete_at(i)
break
end
end
@chara_two_pushed = false
end
wor_twopla_sprmap_updcha
end
end

class Game_Map
alias wor_twopla_gammap_passable passable?
def passable?(x, y, flag = 0x01)
if $game_player2 != nil and flag
return false if $game_player2.x == x and $game_player2.y == y
end
wor_twopla_gammap_passable(x, y, flag)
end
end

Autor:nose :S

Bueno eso es todo,adios Baila
avatar
jugito08
Iniciado
Iniciado

0/3

Créditos 46

Gracias : 3

Volver arriba Ir abajo

Re: (RMVX) 2 Scripts muy buenos,DIA/NOCHE y 2 Players

Mensaje por orochii el 2010-01-29, 18:59

Pues no están mal los scripts ;D. Del 2-PLAYERS conocía otro, no estoy seguro si es el mismo o no... del Día/Noche, me queda solamente decir que estuve revisándolo (tenía que haber parte configurable, y vienen muchas opciones muy buenas xDD) y realmente me ha impresionado mucho (aunque yo <modestia aparte, claro si supiera scriptear> hubiese hecho más configurable la parte de las fases, ya que al parecer todas duran la misma cantidad de frames).

Excelente aporte jugito, y felicidades a KGC y "nose" (xd, como está indocumentado... también revisé eso) por los excelentes scripts, suerte,
Orochii Zouveleki
avatar
orochii
Reportero

0/3

Créditos 7343

Gracias : 477

Volver arriba Ir abajo

Re: (RMVX) 2 Scripts muy buenos,DIA/NOCHE y 2 Players

Mensaje por Poka el 2010-08-22, 01:13

Perdon por el necroposting....


Pero estoy usando el Script de 2 Jugadores (funciona perfectamente) y bueno... Yo tengo al jugador1 (el de siempre) con una velocidad superior, y me gustaría que el jugador2 también fuera rápido y estuviese con la animación parado en ON...

¿Alguien sabe como? No me importa disminuir la velocidad del jugador1, pero por preguntar... Tampoco es tan "necesario", pero uno quiere un juego a un estilo y bueno... Creo que me divago demasiado...

Creo que ya se me entiende... u.u"
avatar
Poka
Guerrero
Guerrero

0/3

Créditos 2567

Gracias : 89

Volver arriba Ir abajo

Re: (RMVX) 2 Scripts muy buenos,DIA/NOCHE y 2 Players

Mensaje por D4rk el 2014-04-09, 16:27

Eh Porque cuando inicio el juego me dice Sintaxys error justamente en la linea 1 del script donde dice begin y no deja iniciar? luego lo del evento esta ya puesto correctamente
avatar
D4rk
Iniciado
Iniciado

0/3

Créditos 8

Gracias : 2

Volver arriba Ir abajo

Re: (RMVX) 2 Scripts muy buenos,DIA/NOCHE y 2 Players

Mensaje por Wecoc el 2014-04-09, 21:13

Menudo necrazo... Pero venga, como es por pedir ayuda... xD

=begin anula el código hasta =end de modo toda esa parte de en medio no es leída por el... lector xDD Y se verá toda de color verde como los comentarios de script.

Pueden pasar algunas cosas, la primera que hayas quitado el =end y por eso el =begin pues queda ahí como tirado, si es eso vuelve a copiar el script y no vuelvas a tocar eso. La segunda es que el =begin o el =end hayan quedado tabulados. No pueden tener tabulaciones/espacios delante. Si al copiar el script te han quedado tabulaciones de más ahí simplemente quítalas de modo que quede justo a inicio del código (a veces el bbcode de foroactivo hace un poco el burro con esas cosas) La tercera que en la línea del =begin o del =end haya alguna otra cosa porque se haya quitado un enter, en ese caso también daría error, es cuestión de volver a dejarlos solos en esa línea. La última, que hayas quitado el = delante del begin, ese = no es opcional.

No se me ocurren más posibilidades.
avatar
Wecoc
Administrador
Administrador



Créditos 12314

Gracias : 655

Volver arriba Ir abajo

Re: (RMVX) 2 Scripts muy buenos,DIA/NOCHE y 2 Players

Mensaje por D4rk el 2014-04-10, 00:47

pues avanzo pero dio otro  Snif Snif  ahora dice undefined superclass Scene Base pffff
avatar
D4rk
Iniciado
Iniciado

0/3

Créditos 8

Gracias : 2

Volver arriba Ir abajo

Re: (RMVX) 2 Scripts muy buenos,DIA/NOCHE y 2 Players

Mensaje por Eron el 2014-04-10, 10:45

Scene_Base está por defecto en VX y Ace, en XP NO. Éste script como pone el título es solo para VX.

Y adelanto que no se puede pasar a XP a no ser que se escriba entero de nuevo porque usa cosas inexistentes en XP como vehículos o comandos de escena extra. Se podría hacer en XP, pero pasar éste directamente no.
avatar
Eron
Principiante
Principiante

0/3

Créditos 3599

Gracias : 60

Volver arriba Ir abajo

Re: (RMVX) 2 Scripts muy buenos,DIA/NOCHE y 2 Players

Mensaje por silvanash el 2014-04-10, 12:00

También es posible que pegase el script en el orden incorrecto. El script hay que pegarlo por debajo de Scene_Base, no por encima. El Maker tiene la costumbre de dar errores raros si pones los materiales de base por debajo de los que necesitan ese material.

Pensé también en la posibilidad de que faltase Scene_Base, pero el título del tema pone claramente que es para VX. No creo que nadie lo llegase a usar en XP.
avatar
silvanash
Aventurero
Aventurero

0/3

Créditos 201

Gracias : 251

Volver arriba Ir abajo

Re: (RMVX) 2 Scripts muy buenos,DIA/NOCHE y 2 Players

Mensaje por D4rk el 2014-04-10, 17:40

vale lo eh solucionado cuando pegue el script sin querer borre el =begin es por eso :B igual gracias a todos
avatar
D4rk
Iniciado
Iniciado

0/3

Créditos 8

Gracias : 2

Volver arriba Ir abajo

Re: (RMVX) 2 Scripts muy buenos,DIA/NOCHE y 2 Players

Mensaje por Contenido patrocinado


Contenido patrocinado


Volver arriba Ir abajo

Ver el tema anterior Ver el tema siguiente Volver arriba


Permisos de este foro:
No puedes responder a temas en este foro.