Vai al contenuto

Rilevato Ad-Blocker. Per favore disabilita il tuo adblocker quando navighi su makerando.com - Non c'è nessun annuncio invasivo.

Cerca nel Forum

Showing results for tags 'Dividi per...?'.



More search options

  • Search By Tags

    Tag separati da virgole.
  • Search By Author

Tipo di contenuto


Forums

  • Comunità
    • Cancello di Ingresso
    • Bacheca
    • Colisseum
  • DevTeam
    • CyberTeam
  • Giochi e Progetti RPG Maker
    • Resa Grafica
    • Concept e Bozze
    • Progetti
    • Giochi RPG Maker Completi e Demo
    • Il Making Oltreoceano
  • Assistenza e Supporto RPG Maker
    • Biblioteca
    • BrainStorming
    • Chiedi Aiuto alla Comunity
    • RPG Maker Scripting
    • PlugIn e AddOn RPG Maker
    • Musica e Suoni
    • Risorse Grafiche RPG Maker
    • Mak - Resources
  • Beyond Making - Oltre RPG Maker
    • Altri Tool

Find results in...

Find results that contain...


Data di creazione

  • Start

    End


Ultimo Aggiornamento

  • Start

    End


Filter by number of...

Iscritto

  • Start

    End


Gruppo


AIM


Indirizzo Web


ICQ


Yahoo


Skype


Location


Interests

Trovato 1 risultato

  1. Nome Script: Dividi per...? Versione: 1.0 Autore/i: 3xter (io) Informazioni: Questo script serve per dividere per un determinato numero un characterset. Di default se antecediamo $ al nome di un chara, esso viene diviso per 3 (un solo elemento) e non per 12 (4 elementi) Con questo script, il file verrà diviso per il numero inserito all'inizio del chara. Istruzioni: Rinominare la risorsa interessata con il numero di frame presenti per X e Y. Prendiamo per esempio questo chara: Di default il vx lo visualizzerebbe male.. Importiamolo nel nostro progetto e rinominiamolo: 44 truppe.png Così facendo abbiamo ottenuto ciò che ci serviva: visualizzare correttamente qualsiasi chara! Script: =begin Script: Dividi per...? Autore: 3xter http://wwww.rpgmkr.net Questo script serve per dividere per un determinato numero un characterset. Di default se antecediamo $ al nome di un chara, esso viene diviso per 3 (un solo elemento) e non per 12 (4 elementi) Con questo script, il file verrà diviso per il numero inserito all'inizio del chara. Esempio: Chara (diviso per 12) $Chara (diviso per 3) 5Chara (diviso per 5) =end class Sprite_Character < Sprite_Base def update_bitmap if @tile_id != @character.tile_id or @character_name != @character.character_name or @character_index != @character.character_index @tile_id = @character.tile_id @character_name = @character.character_name @character_index = @character.character_index if @tile_id > 0 sx = (@tile_id / 128 % 2 * 8 + @tile_id % 8) * 32; sy = @tile_id % 256 / 8 % 16 * 32; self.bitmap = tileset_bitmap(@tile_id) self.src_rect.set(sx, sy, 32, 32) self.ox = 16 self.oy = 32 else self.bitmap = Cache.character(@character_name) #Il valore numerico di un numero in stringa è di (valore - 48) #La variabile num infatti è uguale al primo carattere di @character_name #meno 48. Visualizzo tramite finestra il valore di x e y con print (commentato) #dopo averli convertito in intero prima = @character_name[0].to_i seconda = @character_name[1].to_i x = (prima - 48) y = (seconda - 48) x.to_i y.to_i #Mostra il valore di X e Y #print x, " e ", y sign = @character_name[/^[!$]./] if sign != nil and sign.include?('$') @cw = bitmap.width / 3 @ch = bitmap.height / 4 #Delimita il campo ai numeri da -infinito a 9 elsif x < 10 and y < 10 @cw = bitmap.width / x @ch = bitmap.height / y else @cw = bitmap.width / 12 @ch = bitmap.height / 8 end self.ox = @cw / 2 self.oy = @ch end end end end ############################################################################# class Window_Base < Window def draw_character(character_name, character_index, x, y) return if character_name == nil bitmap = Cache.character(character_name) #Il valore numerico di un numero in stringa è di (valore - 48) #La variabile num infatti è uguale al primo carattere di @character_name #meno 48. Visualizzo tramite finestra il valore di num con print num #dopo averlo convertito in intero prima = @character_name[0].to_i seconda = @character_name[1].to_i x = (prima - 48) y = (seconda - 48) x.to_i y.to_i #Mostra il valore di X e Y #print x, " e ", y sign = @character_name[/^[!$]./] if sign != nil and sign.include?('$') @cw = bitmap.width / 3 @ch = bitmap.height / 4 #Delimita il campo ai numeri da -infinito a 9 elsif x < 10 and y < 10 @cw = bitmap.width / x @ch = bitmap.height / y else @cw = bitmap.width / 12 @ch = bitmap.height / 8 end n = character_index src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch) self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect) end end
×