Rpg˛S Forum uses cookies. Read the Privacy Policy for more info. To remove this message, please click the button to the right:    I accept the use of cookies

Vai al contenuto

Rpg˛S Forum uses cookies. Read the Privacy Policy for more info. To remove this message, please click the button to the right:    I accept the use of cookies

Screen Contest #90

Kamikun






  • Si prega di effettuare il log in prima di rispondere
Domanda sullo scripting

    Master Danix
  • Non ho scampo

  • Utenti
  • Rens: 37
  • 4
  • Stelletta
  • 70 messaggi
  • Sesso:Maschio
  • Provenienza:Vigevano
  • Abilitā:Esperto

#1 Inviato 12 May 2020 - 21:30 PM

Non sono un esperto, ma se in uno script volessi moltiplicare una variabile già definita dovrei fare cosi? @varX*=16
perchè quando l'avvio mi da errore dicendomi che è troppo lunga da gestire



    Dax
  • C'č pių gioia nel dare che nel ricevere

  • Rpg˛S Admin
  • Rens: 838
  • 7
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 4553 messaggi
  • Sesso:Maschio
  • Provenienza:Nord Sud Ovest Est
  • Abilitā:Maestro


#2 Inviato 12 May 2020 - 21:57 PM

Detta così non si capisce bene, puoi incollare parte dello script?

Per arrivare a dire che una variabile è "troppo grande da gestire" mi viene in mente che lo script parta e venga eseguito tantissime volte, moltiplicando ogni volta per 16 il numero fino ad arrivare a un valore fuori scala.

Per dirti, se parti da 1 e lo script viene eseguito a ogni frame, per circa 60 frames al secondo, ti esce un numero a 72 zeri xD


Membro Segreto della
Vecchia Guardia del Making [Gif in fase di reload]

SCContest1Oct.gif[icona di un premio]

tgSY1j0.pnggifnatale1.pnggifnatale12.png


    Master Danix
  • Non ho scampo

  • Utenti
  • Rens: 37
  • 4
  • Stelletta
  • 70 messaggi
  • Sesso:Maschio
  • Provenienza:Vigevano
  • Abilitā:Esperto

#3 Inviato 12 May 2020 - 22:07 PM

class Scene_Mappa < Scene_Base
  def start
    super
    @varX= $game_player.x
    @varY= $game_player.y
    make_picture
  end
  def make_picture
    @pic=Sprite.new
    @pic.bitmap=Cache.picture('MappaP1-00')
    @puntatore=Sprite.new
    @puntatore.bitmap=Cache.picture('puntatore3')
    if $game_switches[46]
      @pic2=Sprite.new
      @pic2.bitmap=Cache.picture('MappaP1-01')
    end
  end
  def update
    super
    @puntatore.x=@varX*=16
    @puntatore.x=@varX+=96
    @puntatore.y=@varY*=16
    @puntatore.y=@varY+=40
  end
end


    Master Danix
  • Non ho scampo

  • Utenti
  • Rens: 37
  • 4
  • Stelletta
  • 70 messaggi
  • Sesso:Maschio
  • Provenienza:Vigevano
  • Abilitā:Esperto

#4 Inviato 12 May 2020 - 22:18 PM

Ok, ho risolto, grazie lo stesso Dax  :biggrin:



    Holy87
  • Prode Guerriero

  • Rpg˛S Staff
  • Rens: 458
  • 6
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 7431 messaggi
  • Sesso:Maschio
  • Provenienza:San Giorgio a Cremano
  • Abilitā:Maestro

#5 Inviato 12 May 2020 - 22:26 PM

nell'update facendo *= moltiplichi ad ogni frame per 16. Ovviamente ti va in overflow in poco tempo.


"Io non volevo solo partecipare alle discussioni. Volevo avere il potere di farle fallire" [cit.]

BannerOverdrive35.png
Cap3.png

578.png
 

Miei script per RPG Maker VX Ace:

Spoiler

 
I miei tutorial:
Spoiler

    Master Danix
  • Non ho scampo

  • Utenti
  • Rens: 37
  • 4
  • Stelletta
  • 70 messaggi
  • Sesso:Maschio
  • Provenienza:Vigevano
  • Abilitā:Esperto

#6 Inviato 12 May 2020 - 23:12 PM

Sisi l'ho capito dopo un pò xD






  • Feed RSS