Jump to content
Rpg²S Forum

cippaman

Utenti
  • Posts

    18
  • Joined

  • Last visited

Posts posted by cippaman

  1. == non =, mi raccomando . . .

     

    Sisi questo lo so XD

     

     

    Lista (delle barre hp): @current_hp_gauge

    Ah quindi da quello che ho capito @current_hp_gauge corrisponde al livello della vita (intesa come barra) che l'actor ha in questo momento mentre target_gauge corrisponde al livello della vita che l'actor ha in conseguenza di un attacco appena subito che lo ha fatto variare da @current_hp_gauge... ok perfetto qui ci siamo... A questo punto se io decidessi di assegnare tutto questo metodo alla vita di un nemico dovrei dire che invece dell'actor voglio i dati del nemico... allora dovrei trovare dei sostitutii a:

    -actor.index

     

    -actor.hp

     

    giusto?

     

    Sei sicuro che la configurazione dello script non preveda già quello che desideri ?

    Sono abbastanza sicuro che non sia prevista una configurazione in questo senso... ho passato tutte le 24.567 righe di codice una per una e non ho trovato niente. Comunque volevo anche ringraziarti per il grande aiuto che mi stai dando, raramente ho trovato persone così XD

  2. Ah! Quindi in parole povere mi stai dicendo chela prima parte del metodo postato in precedenza si ripete finchè @current_hp_gauge = target_gauge? Ok, ho capito il funzionamento globale dello script, l'unica cosa che ti chiedo è se puoi pazientemente (sono pesante a volte XD) spiegarmi meglio
    @updating sembra indicare l'indice della barra da aggiornare nella lista . . .
    ... che lista? e a queso proposito actor.index fa riferimento all'indice dei personaggi come suggerisce il nome?
  3. Grazie per la tua pronta risposta ma non ho capito bene: di standard nello YEM il metodo refresh dello stato dei nemici si riferisce a Window_Base; uno dei metodi chiamati dal refresh è il draw_back_gauge ed il draw_enemy_hp_gauge... i due metodi in questione si riferiscono il primo allo stesso Window_Base (e per me va benissimo tanto la barra di sfondo della vita rimane quella e non cala), ma il problema è che anche il secondo si riferisce a Window_Base perchè di standard lo YEM ti fa vedere la vita dei nemici solo quando decidi di attaccarli e poi scompare per ricomparire il turno dopo con la vita aggiornata... Invece il metodo che permette alla vita dell'actor di scalare come io vorrei facesse anche quella del nemico è draw_member_hp(actor, rect) il quale si riferisce alla classe Window_BattleStatus < Window_Selectable...

     

    sotto spoiler posto il codice del metodo draw_member_hp(actor, rect)

     

     

     

    def draw_member_hp(actor, rect)

    @updating = -1

    i = actor.index

    maxhp = @maxhp

    dy = 56 #WLH * 3 - YEM::BATTLE_ENGINE::PARTY_WINDOW[:stat_size]

    dx = 0 #rect.x + 2

    @hp_gauge_width = 160

     

    self.contents.fill_rect(dx,dy+WLH-8 , @hp_gauge_width, 8, gauge_back_color)#dy+WLH-8

    #---

     

    target_gauge = (actor.hp * @hp_gauge_width / maxhp)

    if @current_hp_gauge > target_gauge

    @updating = i

    @current_hp_gauge -= [2, (@current_hp_gauge-target_gauge).abs].min

    @current_hp_gauge = [@current_hp_gauge, 0].max

    gw = @current_hp_gauge

    gw = [gw, 3].max if actor.hp > 0

    gc1 = text_color(YEM::BATTLE_ENGINE::PARTY_WINDOW[:hp_dmg_gauge])

    gc2 = text_color(YEM::BATTLE_ENGINE::PARTY_WINDOW[:hp_dmg_gauge])

    self.contents.gradient_fill_rect(dx+1, dy+WLH-7, gw-2, 6, gc1, gc2)

    gw = @hp_gauge_width * actor.hp / maxhp

    gw = [gw, 3].max if actor.hp > 0

    gc1 = hp_gauge_color1

    gc2 = hp_gauge_color2

    self.contents.gradient_fill_rect(dx+1, dy+WLH-7, gw-2, 6, gc1, gc2)

    elsif @current_hp_gauge < target_gauge

    @updating = i

    @current_hp_gauge += [2, (@current_hp_gauge-target_gauge).abs].min

    @current_hp_gauge = [@current_hp_gauge, @hp_gauge_width].min

    gw = @current_hp_gauge #@hp_gauge_width * actor.hp / maxhp

    gw = [gw, 3].max if actor.hp > 0

    gc1 = text_color(YEM::BATTLE_ENGINE::PARTY_WINDOW[:hp_heal_gauge])

    gc2 = text_color(YEM::BATTLE_ENGINE::PARTY_WINDOW[:hp_heal_gauge])

    self.contents.gradient_fill_rect(dx+1, dy+WLH-7, gw-2, 6, gc1, gc2)

    gw = @current_hp_gauge

    gw = [gw, 3].max if actor.hp > 0

    gc1 = hp_gauge_color1

    gc2 = hp_gauge_color2

    self.contents.gradient_fill_rect(dx+1, dy+WLH-7, gw-2, 6, gc1, gc2)

    else

    gw = @current_hp_gauge

    gw = [gw, 3].max if actor.hp > 0

    gc1 = hp_gauge_color1

    gc2 = hp_gauge_color2

    self.contents.gradient_fill_rect(dx+1, dy+WLH-7, gw-2, 6, gc1, gc2) #gw-2

    end

    #---

    if maxhp > actor.maxhp

    gce = text_color(YEM::BATTLE_ENGINE::PARTY_WINDOW[:exhaust_gauge])

    gbw = @hp_gauge_width * (actor.base_maxhp - actor.maxhp) / maxhp + 1

    gbc = gauge_back_color

    self.contents.fill_rect(dx+@hp_gauge_width-gbw-2, dy+WLH-8, gbw, 8, gbc)

    self.contents.fill_rect(dx+@hp_gauge_width-gbw-1, dy+WLH-7, gbw, 6, gce)

    end

    #---

    if @current_hp != actor.hp

    @updating = i

    den = [@hp_gauge_width/3 + rand(@hp_gauge_width/2), 1].max

    value = [[maxhp/den, (@current_hp-actor.hp).abs].min, 1].max

    @current_hp += (@current_hp > actor.hp) ? -value : value

    @current_hp = actor.hp if @current_hp_gauge == target_gauge

    end

    #---

    dy += 4

    self.contents.font.size = YEM::BATTLE_ENGINE::PARTY_WINDOW[:stat_size]

    self.contents.font.color = system_color

    #self.contents.draw_text(dx, dy, rect.width-4, WLH, Vocab::hp_a, 0)

    self.contents.font.color = hp_color(actor)

    text = @current_hp

    self.contents.draw_text(dx, dy, rect.width-4, WLH, text, 2)

    #---

    end

     

     

     

    Dato che l'unica cosa che non capisco è quel @updating a cosa serva (dal nome penso sia ciò che fa funzionare la ripetizione del metodo ma non capisco in che modo) vorrei quindi sapere se è proprio in questo metodoche c'è il processo che permette di ripeterlo oppure se è un'altro metodo che richiama da fuori draw_member_hp(actor, rect) tante volte.

  4. Salve a tutti, non sapevo che titolo mettere e quindi ho messo update metodo per semplificare al massimo le cose.

     

    Mi spiego:

     

    vorrei che nel bel mezzo di - per esempio- una battaglia, ci fosse un'immagine che si aggiornasse in base ad un metodo che io andrò a creare senza mettere in pausa tutto il gioco (quindi vorrei che le animazioni di battaglia come l' idle stance continuassero).

     

    In parole povere sto cercando di far si che la barra hp del nemico diminuisca quando viene colpito come fa la barra hp degli actor. Qualcuno sa dirmi se esiste un comando o una procedura che possa trattare un metodo come fosse un 'evento parallelo' e che quindi quando venga eseguito non comprometta l'avvio di altri metodi?

     

    Magari esisteranno script che permettono di vedere la barra hp del nemico come voglio io ma sto customizzando lo YEM e quindi sto cercando di farmi da solo lo script... se però qualcuno è a conoscenza di un addon per lo Yanfly che permetta di fare questa cosa, beh è un ottimo inizio XD

  5. Grazie per la tua risposta... avevo bisogno di aiuto perchè le animazioni di rpg maker vx non mi bastavano (999 erano troppo poche) quindi volevo mostrare animazioni-lotta con dei video... ma poi ho scoperto che esiste il database limit break e quindi ho aumentato il numero delle animazioni al numero che mi serviva (circa 10000 per ora XD)... Grazie in ogni caso per la tua risposta e devo dire che l'animazione del video non era niente male!!
  6. Salve a tutti, per inserire video in rpg maker vx le ho provate tutte e alla fine l'unico script che ha funzionato è questo:

     

     

     

    #==============================================================================

    #

    # SOV ~ Videos

    #

    #==============================================================================

    # Author: SuperOverlord

    #==============================================================================

    # Features:

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

    # o Play video's on the map or in battle using a simple script event command.

    #

    # o Optionally pause or exit video's while they play.

    #

    # o View the video in the game window or in fullscreen.

    #

    # o Setup video skills, which show the video before damage effects.

    #==============================================================================

    # Instructions:

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

    # o Place all videos in a folder with the same name as in configuration.

    # This folder is created automatically the first time the game is played if

    # it doesn't already exist.

    #

    # o Playing Videos when on the map.

    #

    # - See script calls below.

    #

    # o Playing videos in battle.

    #

    # - As when on the map the script event command can be used in battle also.

    #

    # - As well as this you can setup skills as video skills which display

    # a video before damaging the enemy.

    #

    # To do this the following tags can be used in the skills notebox:

    # 1) <video_name = "filename">

    # ~ name is the name of the video file. If the filename extension is

    # missing the first file matching that name is used.

    # (Quotes are necessary around the filename)

    #

    # As well as the first tag 2 others are available. These tags will only

    # take effect if placed on a line below the first tag.

    # If these don't exist they are assumed true.

    #

    # 2) <video_exitable = n> ~ Can the video be exited by the exit input?

    # 3) <video_pausable = n> ~ Can the video be paused?

    # ~ n is replaced with either t or f (t : true, f : false)

    #

    # For other Video properties (x,y,width,height,fullscreen) the default

    # settings are used. (See script calls below)

    #==============================================================================

    # Script Calls:

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

    # Commands (From the script call command on page three of event commands)

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

    # o To change default values for video properties.

    #

    # 1) Video.default_x = n

    # 2) Video.default_y = n

    # 3) Video.default_width = n

    # 4) Video.default_height = n

    # 5) Video.fullscreen = bool

    #

    # In all 5 commands above:

    # ~ n is an integer value

    # ~ bool is either true or false

    #

    # o To play videos

    #

    # play_video(filename,exitable,pausable)

    # ~ filename : name of video file (Must be in quotes)

    # ~ exitable : Can the video be exited? (When left out = true)

    # ~ pausable : Can the video be paused? (When left out = true)

    #

    # For all other values the default's are used.

    #==============================================================================

    # Compatibility:

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

    # o Skill videos will depend on the battle system but sould work.

    #==============================================================================

    # Credit:

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

    # o Credit goes to Trebor and Berka whose scripts helped be figure out the

    # mci_send_stringA function.

    #==============================================================================

     

    module SOV

    module Video

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

    # Configuration

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

    # Name of folder for videos to be held in.

    DIR_NAME = "Videos"

    # Exit video input

    EXIT_INPUT = Input::B

    # Pause video input

    PAUSE_INPUT = Input::R

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

    # End Configuration

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

    end

    end

     

    #==============================================================================

    # Import

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

    $imported = {} if $imported == nil

    $imported['Videos'] = true

    #==============================================================================

     

    #==============================================================================

    # ** SOV::Video::Commands

    #==============================================================================

     

    module SOV::Video::Commands

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

    # * Play a video

    # filename : video's filename (with or without extension)

    # exitable : Can the video be exited

    # pausable : Can the video be paused

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

    def play_video(filename,exitable=true,pausable=true)

    video = Cache.video(filename)

    video.exitable = exitable

    video.pausable = pausable

    if $game_temp.in_battle # In battle

    $scene.play_video(video)

    else # On map

    $game_map.video = video

    end

    end

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

    # Define as module function

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

    module_function :play_video

    end

     

    #==============================================================================

    # ** SOV::Video::Regexp

    #==============================================================================

     

    module SOV::Video::Regexp

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

    # * Skill

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

    module Skill

    FILENAME = /<video[_ ]?(?:file)?name = "(.+)">/i

    PAUSABLE = /<video[_ ]?paus(?:e|able) = (t|f)>/i

    EXITABLE = /<video[_ ]?exit(?:able)? = (t|f)>/i

    end

    end

     

    #==============================================================================

    # ** SOV::Game

    #==============================================================================

     

    module SOV::Game

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

    # Constants

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

    INI = 'Game'

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

    # * Get the game windows handle

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

    def self.hwnd

    unless defined?(@@hwnd)

    find_window = Win32API.new('user32','FindWindow','pp','i')

    @@hwnd = find_window.call('RGSS Player',title)

    end

    return @@hwnd

    end

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

    # * Get game title

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

    def self.title

    unless defined?(@@title)

    @@title = read_ini('title')

    end

    return @@title

    end

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

    # * Read ini (Returns nil or match)

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

    def self.read_ini(variable,filename=INI)

    reg = /^#{variable}=(.*)$/

    File.foreach(filename+'.ini') { |line| break($1) if line =~ reg }

    end

    end

     

    #==============================================================================

    # ** Cache

    #==============================================================================

     

    module Cache

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

    # Class Variables

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

    @@vcache = {}

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

    # Define as class methods

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

    class << self

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

    # Alias List

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

    alias sov_video_clear clear unless $@

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

    # * Get a video object

    # filename : basename of file

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

    def video(filename)

    # Get full filename if extension is missing

    if File.extname(filename) == ''

    files = Dir["#{SOV::Video::DIR_NAME}/#{filename}.*"]

    filename = File.basename(files[0]) # Set as first matching file

    end

    # Create or get the video object.

    if @@vcache.has_key?(filename)

    @@vcache[filename]

    else

    @@vcache[filename] = Video.new(filename)

    end

    end

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

    # * Clear

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

    def clear

    @@vcache.clear

    sov_video_clear

    end

    end

    end

     

    #==============================================================================

    # ** RPG::Skill

    #==============================================================================

     

    class RPG::Skill < RPG::UsableItem

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

    # * Determine if skill has a video skill

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

    def video

    if @video == nil

    @note.each_line { |line|

    if @video == nil

    @video = Cache.video($1) if line =~ SOV::Video::Regexp::Skill::FILENAME

    else

    @video.pausable = ($1 == 't') if line =~ SOV::Video::Regexp::Skill::PAUSABLE

    @video.exitable = ($1 == 't') if line =~ SOV::Video::Regexp::Skill::EXITABLE

    end

    }

    @video = :invalid if @video == nil

    end

    return @video

    end

    end

     

    #==============================================================================

    # ** Video

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

    # Class handling playing videos.

    #==============================================================================

     

    class Video

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

    # Constants

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

    TYPE_AVI = 'avivideo'

    TYPE_MPEG = 'mpegvideo'

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

    # Class Variables

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

    @@default_x = 0

    @@default_y = 0

    @@default_width = Graphics.width

    @@default_height = Graphics.height

    @@fullscreen = false

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

    # * Get and Set default_x/y/width/height

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

    for d in %w(x y width height)

    # Define setter method

    module_eval(%Q(def self.default_#{d}=(i); @@default_#{d} = i; end))

    # Define getter method

    module_eval(%Q(def self.default_#{d}; @@default_#{d}; end))

    end

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

    # * Get fullscreen

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

    def self.fullscreen

    @@fullscreen

    end

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

    # * Set fullscreen

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

    def self.fullscreen=(val)

    @@fullscreen = val

    end

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

    # * Win32API

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

    @@mciSendStringA = Win32API.new('winmm','mciSendStringA','pplp','i')

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

    # * Video Command

    # command_string : string following mci_command_string format

    # buffer : string to retrieve return data

    # buffer_size : number of characters in buffer

    # callback_handle : handle of window to callback to. Used if notify is used

    # in the command string. (Not supported by game window)

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

    def self.send_command(cmnd_string,buffer='',buffer_size=0,callback_handle=0)

    # Returns error code. No error if NULL

    err = @@mciSendStringA.call(cmnd_string,buffer,buffer_size,callback_handle)

    if err != 0

    buffer = ' ' * 255

    Win32API.new('winmm','mciGetErrorString','LPL','V').call(err,buffer,255)

    raise(buffer.squeeze(' ').chomp('\000'))

    end

    end

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

    # * Play a video

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

    def self.play(video)

    # Make path and buffer

    path = "#{SOV::Video::DIR_NAME}/#{video.filename}"

    buffer = ' ' * 255

    # Initialize device and dock window with game window as parent.

    type = " type #{video.type}" if video.type != ''

    send_command("open #{path}#{type} alias VIDEO style child parent #{SOV::Game.hwnd}")

    # Display video in client rect at x,y with width and height.

    x = video.x

    y = video.y

    width = video.width

    height = video.height

    send_command("put VIDEO window at #{x} #{y} #{width} #{height}")

    # Begin playing video

    screen = @@fullscreen ? 'fullscreen' : 'window'

    send_command("play VIDEO #{screen}")

    # Start Input and status processing loop

    while buffer !~ /^stopped/

    # Idle processing for a frame

    sleep(1.0/Graphics.frame_rate)

    # Get mode string

    send_command('status VIDEO mode',buffer,255)

    Input.update

    if Input.trigger?(SOV::Video::PAUSE_INPUT) and video.pausable?

    Sound.play_cursor

    if buffer =~ /^paused/ # If already paused

    send_command("resume VIDEO") # Resume video

    else # Otherwise

    send_command("pause VIDEO") # Pause video

    end

    elsif Input.trigger?(SOV::Video::EXIT_INPUT) and video.exitable?

    Sound.play_cancel

    # Terminate loop on exit input

    break

    end

    end

    # Terminate the device

    send_command('close VIDEO')

    end

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

    # Public Instance Variables

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

    attr_accessor :x

    attr_accessor :y

    attr_accessor :width

    attr_accessor :height

    attr_writer :exitable

    attr_writer :pausable

    attr_reader :filename

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

    # * Initialize

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

    def initialize(filename)

    unless FileTest.file?("#{SOV::Video::DIR_NAME}/#{filename}")

    raise(Errno::ENOENT,filename)

    end

    @filename = filename

    @x = @@default_x

    @y = @@default_y

    @width = @@default_width

    @height = @@default_height

    @exitable = true

    @pausable = true

    end

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

    # * Get Type

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

    def type

    if @type == nil

    case File.extname(@filename)

    when '.avi'; @type = TYPE_AVI

    when '.mpeg'||'.mpg'; @type = TYPE_MPEG

    else

    @type = ''

    end

    end

    @type

    end

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

    # * Is the video exitable?

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

    def exitable?

    @exitable

    end

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

    # * Is the video pausable?

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

    def pausable?

    @pausable

    end

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

    # Access

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

    private_class_method :send_command

    end

     

    #==============================================================================

    # ** Game_Interpreter

    #==============================================================================

     

    class Game_Interpreter

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

    # Import

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

    include(SOV::Video::Commands)

    end

     

    #==============================================================================

    # ** Game_Map

    #==============================================================================

     

    class Game_Map

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

    # Public Instance Variables

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

    attr_accessor :video

    end

     

    #==============================================================================

    # ** Scene_Map

    #==============================================================================

     

    class Scene_Map

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

    # Alias List

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

    alias sov_video_update update unless $@

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

    # * Play Video

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

    def play_video(video)

    # Memorize and stop current bgm and bgs

    bgm = RPG::BGM.last

    bgs = RPG::BGS.last

    RPG::BGM.stop

    RPG::BGS.stop

    # Play video

    Video.play(video)

    # Restart bgm and bgs

    bgm.play

    bgs.play

    end

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

    # * Update

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

    def update

    if $game_map.video != nil

    play_video($game_map.video)

    $game_map.video = nil

    Input.update

    else

    sov_video_update

    end

    end

    end

     

    #==============================================================================

    # ** Scene_Battle

    #==============================================================================

     

    class Scene_Battle

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

    # * Alias list

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

    alias sov_video_execute_action_skill execute_action_skill unless $@

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

    # * Play Video

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

    def play_video(video)

    # Memorize and stop current bgm

    bgm = RPG::BGM.last

    RPG::BGM.stop

    # Play video

    Video.play(video)

    # Restart bgm

    bgm.play

    end

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

    # * Execute Action Skill

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

    def execute_action_skill

    skill = @active_battler.action.skill

    if skill.video.is_a?(Video)

    execute_action_video(skill)

    else

    sov_video_execute_action_skill

    end

    end

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

    # * Execute Action Video

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

    def execute_action_video(skill)

    text = @active_battler.name + skill.message1

    @message_window.add_instant_text(text)

    unless skill.message2.empty?

    wait(10)

    @message_window.add_instant_text(skill.message2)

    end

    wait(20)

    @message_window.clear

    #Fadout to black screen

    br = Graphics.brightness

    120.times { |i| Graphics.brightness = 255 - 255/60 * i; Graphics.update }

    # Play video

    play_video(skill.video)

    #Reset brightness

    Graphics.brightness = br

    targets = @active_battler.action.make_targets

    display_animation(targets, skill.animation_id)

    @active_battler.mp -= @active_battler.calc_mp_cost(skill)

    $game_temp.common_event_id = skill.common_event_id

    for target in targets

    target.skill_effect(@active_battler, skill)

    display_action_effects(target, skill)

    end

    end

    end

     

    #==============================================================================

    # Pre-Main Processing

    #==============================================================================

     

    unless FileTest.directory?(SOV::Video::DIR_NAME) # If directory doesn't exist.

    Dir.mkdir(SOV::Video::DIR_NAME) # Make the directory

    end

     

     

     

    Adesso vorrei chiedervi: come posso fare affinchè un video in lotta (associato ad una skill naturalmente) possa partire mentre i chara nella lotta ancora si muovono con le loro idle stance(uso lo YEM)?

    Questo perchè il video ci mette tipo un secondo buono per partire... quindi ho un secondo in cui è tutto bloccato e POI parte il video...è piuttosto fastidioso XD

  7. Salve, mi scuso per aver postato due topic in due giorni ma questo è un problema che ho da un po' di tempo (non è che per il minimo problema vengo a chiedere subito! XD)...

     

    Allora il fatto è che, usando il kgc largeparty, voglio inserire una riga di codice che faccia partire il metodo process_defeat del BEM solo se tutti i membri del gruppo sono morti... per chi non lo sapesse il kgc largeparty è uno script che permette di dividere in due parti tutti i membri del gruppo: da una parte il vero e proprio party (cioè chi combatterà effettivamente in una battaglia) e dall'altra lo standby party (membri che, pur facendo parte del gruppo, non combattono automaticamente quando si entra in un combattimento ma possono essere cambiati con membri facenti parte del party vero e proprio).

     

    Quindi quello che voglio io è che il process_defeat parta solo se TUTTI i membri del party e dello standby party sono morti... attualmente la battaglia finisce quando il party è morto, ma tutti gli actors nello standby sono vivi e fremono per combattere!

     

    il metodo che immagazzina gli IDs degli actors dello standby party in una variabile globale dovrebbe essere

     

     

     

    def get_stand_by_member_ids

    result = []

    $game_party.stand_by_members.each { |actor| result << actor.id }

    return result

    end

     

     

     

    Dove devo sbattere la testa??? XD

  8. Salve a tutti, sono ritornato con i miei problemi da quattro soldi! Questa volta mi sono bloccato perchè, volendo caricare l'informazione dell' actor id in una variabile, ho scritto (come specificato da una guida trovata online):

     

    class Window_Scene<Window_Base

    def initialize(actor)

    super(0, 0, 640, 480)

    @actor = actor

    refresh

    end

    def refresh

    self.contents.draw_text(0, -50, 544, 128, "Fai abbastanza schifo")

    end

    end

     

    Quando provo a farlo girare rpg mi dice che ho sbagliato il numero di argomenti e che il numero corretto è 0 (praticamente mi dici che devo togliere l'actor dopo l'inizialize, credo). A questo punto mi viene spontanea una domanda: dato che le informazioni sull'actor sono contenute specificatamente in Window_Status con la stessa sintassi (che poi fa comunque riferimento a Window_Base), come faccio a caricarle in uno script come quello che ho appena scritto senza che mi esca quel fastidioso errore??

  9. ... mi sento giusto un po' idiota XD ora funziona! non ci avevo fatto caso perchè ho sempre fatto copia-incolla XD grazie mille!!!! Tra parentesi le virgolette storte non so neanche come si facciano!
  10. Ho provato a far girare lo script anche su rpg maker xp ma niente anche li... non è che qualcuno può provare lo script sul suo e dirmi se funziona o meno? Perchè a questo punto non so più che pesci pigliare XD
  11. Allora io ho provato a far partire lo script di giver:

     

     

    class Finestra < Window_Base

    def initialize

    super (20, 20, 400, 64)

    self.openness = 100

    create_contents

    self.contents.draw_text(0, 0, 368, 20, “Hello World! How is everyone”)

    end

    def create_contents

    self.contents=Bitmap.new(368,32)

    end

    end

     

     

    Ma l'errore che mi da è sempre quello della riga 6...

  12. Allora, provando a far partire lo script di giver il gioco non parte e una finestra di errore mi dice: Script 'Finestra' line 6: SyntaxError occurred. Quindi andando a rivedere lo script la riga 6 corrisponde a contents.draw_text(0, 0, 368, 20, “Hello World! How is everyone”) quindi il problema è che il programma non mi riconosce questo tipo di sintassi... credo...

    Se magari puoi specifica cosa significa quel "non è scritto bene" (uno screen magari)! Ad esempio la scritta è stretta o piccola o tagliata? Quello può dipendere dalla dimensione troppo piccola della finestra!

    ^ ^

    io intendevo che proprio non mi parte il gioco e che c'è un avviso di errore nel momento in cui provo a testarlo...forse non mi ero spiegato bene XD

  13. Salve a tutti, ho un piccolo problema con rpg maker vx. Da poco ho deciso di imparare l'rgss2 e quindi ora sono qui a far prove su prove per far andare il più semplice e maledetto script: un messaggio. Seguendo le indicazioni di molte guide e guardando gli script già presenti nel programma, ho capito come far apparire una finestra nel gioco

     

     

    class Finestra < Window_Base

    def initialize

    super (20, 20, 400, 64)

    finestra = Window.new()

    finestra.x = 20

    finestra.y = 20

    finestra.width = 400

    finestra.height = 64

    finestra.openness = 100

    end

    end

     

    E fin qua anche un bambino di tre anni lo capisce, però nel momento in cui boglio scriverci dentro un messaggio, sorgono svariati problemi. Per esempio in una guida su internet di Elder ho letto che dovevo aggiungere

    sfondo=Bitmap.new("Graphics/System/Window")

    finestra.windowskin=sfondo

    finestra.contents=Bitmap.new(368,32)

    finestra.contents.draw_text(0, 0, 368, 20, “Hello World! How is everyone”, )

    e poi concludere lo script ma nel momento in cui lo provo, il programma mi avverte che finestra.contents.draw_text(0, 0, 368, 20, “Hello World! How is everyone”, ) non è scritto bene (e non so il motivo). Ho provato ad andare in altre guide che mi hanno detto sempre di usare questo tipo di sintassi ed è sempre la stessa storia. Qualcuno sa aiutarmi? (sicuramente sì dato che sono agli inizi)

×
×
  • Create New...