Ho adottato e modificato uno script secondo le esigenze del mio gioco, si tratta di un radar-bussola, prendendo come punto di riferimento un evento indica con delle picture la sua posizione. Lo script viene attivato solo se una switch è attiva adesso il problema è questo, quando disattivo la switch mediante un evento comune il sistema viene disattivato ma l'ultima picture visualizzata rimane su schermo. Se cambio scena (entro nel menù per esempio) questa scompare come regolarmente dovrebbe essere. Credo di aver anche capito cosa dovrei inserire ma non so dove quindi chiedo a voi molto più esperti di me. lo script è questo:
# Creato da KJR. class Window_Radar < Window_Base ID = 1 ID2 = 1 DEC = true def initialize super(400,335,290,200) self.contents = Bitmap.new(width-32,height-32) self.opacity = 0 refresh end def refresh if $game_switches[ID2] alvo_id = $game_variables[ID] if alvo_id <= 0 pic = RPG::Cache.picture("BSL-NIL") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) else alvo = $game_map.events[alvo_id] hero = $game_player hx = hero.x hy = hero.y ax = alvo.x ay = alvo.y self.contents.clear if ax < hx and ay < hy self.contents.clear pic = RPG::Cache.picture("BSL-LU") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) elsif ax == hx and ay < hy self.contents.clear pic = RPG::Cache.picture("BSL-U") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) elsif ax > hx and ay < hy self.contents.clear pic = RPG::Cache.picture("BSL-RU") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) elsif ax < hx and ay == hy self.contents.clear pic = RPG::Cache.picture("BSL-L") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) elsif ax > hx and ay == hy self.contents.clear pic = RPG::Cache.picture("BSL-R") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) elsif ax < hx and ay > hy self.contents.clear pic = RPG::Cache.picture("BSL-LD") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) elsif ax == hx and ay > hy self.contents.clear pic = RPG::Cache.picture("BSL-D") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) elsif ax > hx and ay > hy self.contents.clear pic = RPG::Cache.picture("BSL-RD") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) elsif ax == hx and ay == hy self.contents.clear pic = RPG::Cache.picture("BSL-NIL") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) elsif alvo == nil pic = RPG::Cache.picture("BSL-NIL") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) end end if ax == hx and ay == hy dist = 0 str = dist.to_s str = dist.to_f.to_s if DEC == true elsif ax != hx and ay == hy dif = ax - hx dist = dif.abs str = dist.to_s str = dist.to_f.to_s if DEC == true elsif ax == hx and ay != hy dif = ay - hy dist = dif.abs str = dist.to_s str = dist.to_f.to_s if DEC == true elsif ax != hx and ay != hy difx = hx - ax # Cateto 1 dify = hy - ay # Cateto 2 dist = Math.hypot(difx, dify) if DEC == true dec = dist.to_i dec = dist - dec dec *= 10 dec = dec.truncate dist = dist.truncate str = dist.to_s + "." + dec.to_s else str = dist.truncate end end self.contents.font.size = 15 self.contents.draw_text(160,52,64,32,str) self.contents.font.size = 21 end endend
Nome:Erech (In elfico "lancia solitaria", da er (ereb) = "solitario" e ech = "lancia")
Età :19
Razza:Umani
Descrizione: Erech è un ragazzo alto e slanciato, dalla corporatura tonica e scattante. Ha capelli lunghi e violacei come gli occhi che però sono spesso coperti in parte da un elegante cappello nero. Veste con uno stile classico, una camicetta bianca sotto una giacca nera e un fiocco al collo ornato con un'immancabile piuma azzurra. Gli piace leggere e scrivere e ama tradurre testi in lingue antiche.
Carattere:Il ragazzo ha un carattere chiuso e introverso, è di poche parole e preferisce i fatti alle parole. Non si relaziona spesso con i coetanei o se lo fa significa che si fida cecamente della persona che ha davanti; è diffidente e tende a non raccontare fatti del suo passato, belli o brutti che siano.
Question
fanton95
Ho adottato e modificato uno script secondo le esigenze del mio gioco, si tratta di un radar-bussola, prendendo come punto di riferimento un evento indica con delle picture la sua posizione. Lo script viene attivato solo se una switch è attiva adesso il problema è questo, quando disattivo la switch mediante un evento comune il sistema viene disattivato ma l'ultima picture visualizzata rimane su schermo. Se cambio scena (entro nel menù per esempio) questa scompare come regolarmente dovrebbe essere. Credo di aver anche capito cosa dovrei inserire ma non so dove quindi chiedo a voi molto più esperti di me. lo script è questo:
# Creato da KJR. class Window_Radar < Window_Base ID = 1 ID2 = 1 DEC = true def initialize super(400,335,290,200) self.contents = Bitmap.new(width-32,height-32) self.opacity = 0 refresh end def refresh if $game_switches[ID2] alvo_id = $game_variables[ID] if alvo_id <= 0 pic = RPG::Cache.picture("BSL-NIL") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) else alvo = $game_map.events[alvo_id] hero = $game_player hx = hero.x hy = hero.y ax = alvo.x ay = alvo.y self.contents.clear if ax < hx and ay < hy self.contents.clear pic = RPG::Cache.picture("BSL-LU") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) elsif ax == hx and ay < hy self.contents.clear pic = RPG::Cache.picture("BSL-U") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) elsif ax > hx and ay < hy self.contents.clear pic = RPG::Cache.picture("BSL-RU") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) elsif ax < hx and ay == hy self.contents.clear pic = RPG::Cache.picture("BSL-L") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) elsif ax > hx and ay == hy self.contents.clear pic = RPG::Cache.picture("BSL-R") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) elsif ax < hx and ay > hy self.contents.clear pic = RPG::Cache.picture("BSL-LD") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) elsif ax == hx and ay > hy self.contents.clear pic = RPG::Cache.picture("BSL-D") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) elsif ax > hx and ay > hy self.contents.clear pic = RPG::Cache.picture("BSL-RD") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) elsif ax == hx and ay == hy self.contents.clear pic = RPG::Cache.picture("BSL-NIL") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) elsif alvo == nil pic = RPG::Cache.picture("BSL-NIL") rect = Rect.new(0,0,168,168) self.contents.blt(126,22,pic,rect) end end if ax == hx and ay == hy dist = 0 str = dist.to_s str = dist.to_f.to_s if DEC == true elsif ax != hx and ay == hy dif = ax - hx dist = dif.abs str = dist.to_s str = dist.to_f.to_s if DEC == true elsif ax == hx and ay != hy dif = ay - hy dist = dif.abs str = dist.to_s str = dist.to_f.to_s if DEC == true elsif ax != hx and ay != hy difx = hx - ax # Cateto 1 dify = hy - ay # Cateto 2 dist = Math.hypot(difx, dify) if DEC == true dec = dist.to_i dec = dist - dec dec *= 10 dec = dec.truncate dist = dist.truncate str = dist.to_s + "." + dec.to_s else str = dist.truncate end end self.contents.font.size = 15 self.contents.draw_text(160,52,64,32,str) self.contents.font.size = 21 end endend"Oh perché dobbiamo essere così, noi? – ci domandiamo talvolta allo specchio - con questa faccia, con questo corpo? – alziamo una mano, nell'incoscienza; e il gesto ci resta sospeso. Ci pare strano che l'abbiamo fatto noi. Ci vediamo vivere. […] In certi momenti di silenzio interiore, in cui l'anima nostra si spoglia di tutte le funzioni abituali, e gli occhi nostri diventano più acuti e più penetranti, noi vediamo noi stessi nella vita, e in se stessa la vita, quasi in una modalità arida, inquietante; ci sentiamo assaltare da una strana impressione, come se, in un baleno, ci si chiarisse una realtà diversa da quella che normalmente percepiamo, una realtà vivente oltre la vista umana, fuori delle forme dell'umana ragione." [L.P.]
http://img43.imageshack.us/img43/4231/vgmiud3f.png
http://rpg2s.net/gif/SCContest1Oct.gif http://www.rpg2s.net/img/fablecontest3rd.png http://rpg2s.net/gif/SCContest1Oct.gif
RPG by forum
http://img59.imageshack.us/img59/6/av2w.png
Nome: Erech (In elfico "lancia solitaria", da er (ereb) = "solitario" e ech = "lancia")
Età : 19
Razza: Umani
Descrizione: Erech è un ragazzo alto e slanciato, dalla corporatura tonica e scattante. Ha capelli lunghi e violacei come gli occhi che però sono spesso coperti in parte da un elegante cappello nero. Veste con uno stile classico, una camicetta bianca sotto una giacca nera e un fiocco al collo ornato con un'immancabile piuma azzurra. Gli piace leggere e scrivere e ama tradurre testi in lingue antiche.
Carattere: Il ragazzo ha un carattere chiuso e introverso, è di poche parole e preferisce i fatti alle parole. Non si relaziona spesso con i coetanei o se lo fa significa che si fida cecamente della persona che ha davanti; è diffidente e tende a non raccontare fatti del suo passato, belli o brutti che siano.
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now