skky88 Posted August 5, 2009 Share Posted August 5, 2009 (edited) LIGHT EFFECT XP V 3.1DescrizioneNon è altro che uno script che implementa delle luci nel giocoAutoriNear Fantastica (versione base)skky88(v 3.1)Allegatifile immagine da inserire nella cartella pitcures , si deve chiamare"LE"(scritto in maiuscolo senza virgolette)Istruzioni per l'usoBasta crare un evento nella mappa e scrivere come commento "FIRE" o "TORCH" o "TORCH2" o "LIGHT" o "LIGHT2" o "GROUND" e sull evento verrà applicata la luce in questione...queste si possono anche rendre invisibili con l'ausilio della switch n°1(è possibile cambiare il valore di questa switch);fire e torch non vengono disattivate dalla switch perchè a me servono cosi(ma cmq e possibile dissativare pure queste o le altre basta chiedere e ve lo modifico)Spoiler #================================ # ■ Light Effects XP V.3.1 #================================ # By: Near Fantastica # Date: 28.06.05 # Version: 3 # modified by:SKKY88 # DATE: 05.08.09 # #================================ class Spriteset_Map alias les_spriteset_map_initalize initialize alias les_spriteset_map_dispose dispose alias les_spriteset_map_update update def initialize @light_effects = [] setup_lights les_spriteset_map_initalize update end def dispose les_spriteset_map_dispose for effect in @light_effects effect.light.dispose end @light_effects = [] end def update les_spriteset_map_update update_light_effects end def setup_lights for event in $game_map.events.values next if event.list == nil for i in 0...event.list.size if event.list[i].code == 108 and event.list[i].parameters == ["GROUND"] type = "GROUND" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 2 light_effects.light.zoom_y = 2 light_effects.light.opacity = 100 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["FIRE"] type = "FIRE" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 5 light_effects.light.zoom_y = 5 light_effects.light.opacity = 100 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT"] type = "LIGHT" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 1 light_effects.light.zoom_y = 1 light_effects.light.opacity = 150 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT2"] type = "LIGHT2" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 1 light_effects.light.zoom_y = 1 light_effects.light.opacity = 150 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["TORCH"] type = "TORCH" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 1 light_effects.light.zoom_y = 1 light_effects.light.opacity = 150 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["TORCH2"] type = "TORCH2" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 1 light_effects.light.zoom_y = 1 light_effects.light.opacity = 150 @light_effects.push(light_effects) end end end for effect in @light_effects case effect.type when "GROUND" effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 48 effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 48 effect.light.blend_type = 1 when "FIRE" effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 146 effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 146 effect.light.tone = Tone.new(255,-100,-255, 0) effect.light.blend_type = 1 when "LIGHT" effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15 effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.blend_type = 1 when "LIGHT2" effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15 effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.blend_type = 1 when "TORCH" effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15 effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.tone = Tone.new(255,-100,-255, 0) effect.light.blend_type = 1 when "TORCH2" effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15 effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.tone = Tone.new(255,-100,-255, 0) effect.light.blend_type = 1 end end end def update_light_effects if $game_switches[1] for effect in @light_effects next if effect.type == "FIRE" || effect.type == "TORCH" effect.light.visible = false end else for effect in @light_effects next if effect.type == "FIRE" || effect.type == "TORCH" effect.light.visible = true end end for effect in @light_effects case effect.type when "GROUND" effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 48 effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 48 when "FIRE" effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 146 effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 146 effect.light.opacity = rand(10) + 90 when "LIGHT" effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15 effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15 when "LIGHT2" effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15 effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15 when "TORCH" effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15 effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.opacity = rand(30) + 70 when "TORCH2" effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15 effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.opacity = rand(10) + 90 end end end end #================================ # ■ Light Effects Class #================================ class Light_Effect #-------------------------------------------------------------- attr_accessor :light attr_accessor :event attr_accessor :type #-------------------------------------------------------------- def initialize(event, type) @light = Sprite.new @light.bitmap = RPG::Cache.picture("LE.PNG") @light.visible = true @light.z = 1000 @event = event @type = type end end Bugs e Conflitti NotiN/A (o almeno fino ad ora) Edited March 14, 2013 by Apo Link to comment Share on other sites More sharing options...
EvilSeep Posted August 5, 2009 Share Posted August 5, 2009 (edited) Bellissimo lo stavo cercando proprio oggi! Grazie mille!! Edit: Pero'ho travato un problema,nelle mappe piu'grandi di 20 15 camminano con l eroe. =S Edited August 5, 2009 by EvilSeep SEEP Universe su Steam:http://cdn.akamai.steamstatic.com/steam/apps/383630/capsule_184x69.jpg?t=1436537417 SEEP Universe: http://www.seepuniverse.com/ (Sito ufficiale) Blogging, dev log e vecchi progetti:SEEP Blog: http://www.seeproduction.blogspot.ie/ (DOWNLOAD dei nostri progetti)SEEP Bar: http://seepbar.blogspot.it/ (il bar viruale dove parlare di retrogaming e giochi indie) Link to comment Share on other sites More sharing options...
tidus00 Posted August 5, 2009 Share Posted August 5, 2009 (edited) alla fine, è lo stesso problema che si ha con gli eventi, a differenza che quello ad eventi si può risolvere... Edited August 5, 2009 by tidus00 http://i46.tinypic.com/260qs1l.jpghttp://i48.tinypic.com/21owyt0.jpghttp://i45.tinypic.com/oj12x5.jpghttp://i45.tinypic.com/oj12x5.jpghttp://i48.tinypic.com/2qanw9v.jpghttp://i45.tinypic.com/oj12x5.jpghttp://i49.tinypic.com/2cpdkb8.jpg http://i47.tinypic.com/vpyfix.jpg http://i45.tinypic.com/jago40.jpg http://img231.imageshack.us/img231/8504/tidus1.png non esco l'ora che vedaUn gioco così ben fatto da farti sballare la testa! XD http://img111.imageshack.us/img111/9452/eevtestvaporeontype4fs.png http://img27.imageshack.us/img27/8540/dsbar.pnghttp://img294.imageshack.us/img294/6876/nostalebar.pnghttp://img90.imageshack.us/img90/2158/tbars.pnghttp://i40.tinypic.com/soqvb8.jpghttp://i45.tinypic.com/29duu1l.jpghttp://img237.imageshack.us/img237/2482/30275.pnghttp://img182.imageshack.us/img182/8/rpgxpbarrpgmzv1.pnghttp://img195.imageshack.us/img195/6998/userbarannette.pnghttp://i48.tinypic.com/awdylh.jpg Link to comment Share on other sites More sharing options...
skky88 Posted August 5, 2009 Author Share Posted August 5, 2009 HO TROVATO LA SOLUZIONE ...DOMANI MODIFICO LO SCRIPT E LO REINVIO... Link to comment Share on other sites More sharing options...
giver Posted August 5, 2009 Share Posted August 5, 2009 #================================# ■ Light Effects XP V.3.1#================================# By: Near Fantastica# Date: 28.06.05# Version: 3# modified by:SKKY88# DATE: 05.08.09##================================ class Spriteset_Mapalias les_spriteset_map_initalize initializealias les_spriteset_map_dispose disposealias les_spriteset_map_update updatedef initialize@light_effects = []setup_lightsles_spriteset_map_initalizeupdateenddef disposeles_spriteset_map_disposefor effect in @light_effectseffect.light.disposeend@light_effects = []enddef updateles_spriteset_map_updateupdate_light_effectsenddef setup_lightsfor event in $game_map.events.valuesnext if event.list == nilfor i in 0...event.list.sizeif event.list[i].code == 108 and event.list[i].parameters == ["GROUND"]type = "GROUND"light_effects = Light_Effect.new(event,type)light_effects.light.zoom_x = 2light_effects.light.zoom_y = 2light_effects.light.opacity = 100@light_effects.push(light_effects)endif event.list[i].code == 108 and event.list[i].parameters == ["FIRE"]type = "FIRE"light_effects = Light_Effect.new(event,type)light_effects.light.zoom_x = 5light_effects.light.zoom_y = 5light_effects.light.opacity = 100@light_effects.push(light_effects)endif event.list[i].code == 108 and event.list[i].parameters == ["LIGHT"]type = "LIGHT"light_effects = Light_Effect.new(event,type)light_effects.light.zoom_x = 1light_effects.light.zoom_y = 1light_effects.light.opacity = 150@light_effects.push(light_effects)endif event.list[i].code == 108 and event.list[i].parameters == ["LIGHT2"]type = "LIGHT2"light_effects = Light_Effect.new(event,type)light_effects.light.zoom_x = 1light_effects.light.zoom_y = 1light_effects.light.opacity = 150@light_effects.push(light_effects)endif event.list[i].code == 108 and event.list[i].parameters == ["TORCH"]type = "TORCH"light_effects = Light_Effect.new(event,type)light_effects.light.zoom_x = 1light_effects.light.zoom_y = 1light_effects.light.opacity = 150@light_effects.push(light_effects)endif event.list[i].code == 108 and event.list[i].parameters == ["TORCH2"]type = "TORCH2"light_effects = Light_Effect.new(event,type)light_effects.light.zoom_x = 1light_effects.light.zoom_y = 1light_effects.light.opacity = 150@light_effects.push(light_effects)endendendfor effect in @light_effectscase effect.typewhen "GROUND"effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 48effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 48effect.light.blend_type = 1when "FIRE"effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 146effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 146effect.light.tone = Tone.new(255,-100,-255, 0)effect.light.blend_type = 1when "LIGHT"effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15effect.light.blend_type = 1when "LIGHT2"effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15effect.light.blend_type = 1when "TORCH"effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15effect.light.tone = Tone.new(255,-100,-255, 0)effect.light.blend_type = 1when "TORCH2"effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15effect.light.tone = Tone.new(255,-100,-255, 0)effect.light.blend_type = 1endendenddef update_light_effectsif $game_switches[1]for effect in @light_effectsnext if effect.type == "FIRE" || effect.type == "TORCH"effect.light.visible = falseendelsefor effect in @light_effectsnext if effect.type == "FIRE" || effect.type == "TORCH"effect.light.visible = trueendendfor effect in @light_effectscase effect.typewhen "GROUND"effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 48effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 48when "FIRE"effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 146effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 146effect.light.opacity = rand(10) + 90when "LIGHT"effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15when "LIGHT2"effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15when "TORCH"effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15effect.light.opacity = rand(30) + 70when "TORCH2"effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15effect.light.opacity = rand(10) + 90endendendend #================================# ■ Light Effects Class#================================ class Light_Effect#--------------------------------------------------------------attr_accessor :lightattr_accessor :eventattr_accessor :type#--------------------------------------------------------------def initialize(event, type)@light = Sprite.new@light.bitmap = RPG::Cache.picture("LE.PNG")@light.visible = true@light.z = 1000@event = event@type = typeendend IMPORTANTE: La versione nel Quote è ancora quella buggata. NON ho postato quella corretta. E' di una banalità estrema correggere questo bug. Hai quasi completamente sostituito il Light System di Near Fantastica per XP con la conversione che Kylock ne aveva fatto per VX, ed hai lasciato nelle espressioni i valori di riposizionamento delle luci dell'altro tool.E' tutto qui il problema . . . Visto che modificherai lo script per "correggerlo", potresti reinserire anche gli effetti che hai eliminato ed aggiustare il flickering esagerato di alcuni di quelli "nuovi" . . . SCRIPT RGSS (RPG Maker XP) VINTAGE LIBRARY [2018+]http://www.rpg2s.net/forum/index.php/topic/21892-vintagevisualsrewrite-enhanced-revised-victory-screen-v-35-da-autori-vari-a-giver/ http://www.rpg2s.net/forum/index.php/topic/21868-eventing-utility-simple-last-battle-events-fix-v-30-by-giver/ http://www.rpg2s.net/forum/index.php/topic/21853-vintagerewrite-constance-menu-per-4-personaggi-da-team-constance-a-giver/ http://www.rpg2s.net/forum/index.php/topic/22126-vintagedoveroso-necroedit-dummy-title-22u-update-per-crearlo-ad-eventi-su-mappa-by-giver/ http://www.rpg2s.net/forum/index.php/topic/22127-vintagevisuals-tale-chapters-save-system-20-by-giver/ Breaking (in ogni senso) News: "Treno deraglia per via del seno di Sakurai Aoi . . ." - Info nello spoiler !! http://afantasymachine.altervista.org/_altervista_ht/NOOOOOOOOOilMIOtreninooooo_500.gifNon riesco a smettere di essere affascinato da immagini come questa . . .http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpgAlcuni wallpapers che faccio ruotare sul mio vecchio PC . . .http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpghttp://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpghttp://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpghttp://afantasymachine.altervista.org/_altervista_ht/phantom_wp01_einzwei.jpg La parte più spassosa della mia vita è quando gli altri cercano di spiegarmi i miei pensieri . . . BBCode TestingTypeface & Size Link to comment Share on other sites More sharing options...
EvilSeep Posted August 6, 2009 Share Posted August 6, 2009 HO TROVATO LA SOLUZIONE ...DOMANI MODIFICO LO SCRIPT E LO REINVIO... Non vedo l'ora! :P SEEP Universe su Steam:http://cdn.akamai.steamstatic.com/steam/apps/383630/capsule_184x69.jpg?t=1436537417 SEEP Universe: http://www.seepuniverse.com/ (Sito ufficiale) Blogging, dev log e vecchi progetti:SEEP Blog: http://www.seeproduction.blogspot.ie/ (DOWNLOAD dei nostri progetti)SEEP Bar: http://seepbar.blogspot.it/ (il bar viruale dove parlare di retrogaming e giochi indie) Link to comment Share on other sites More sharing options...
skky88 Posted August 6, 2009 Author Share Posted August 6, 2009 editato lo script sopra...giver io conosco lo script di kylock perche l'ho visto girare sul pc di un mio amico...ho solo usato gli stessi comandi perchè a me servivano così ma lo script lo corretto io senza fare copia in colla...cmq ora sono gia al lavoro sulla versione 4.0 dove implementero anche l'effetto luci dalle finestre Link to comment Share on other sites More sharing options...
skky88 Posted August 6, 2009 Author Share Posted August 6, 2009 LIGHT EFFECT XP V 3.2DescrizioneNon è altro che uno script che implementa delle luci nel giocoAutoriNear Fantastica (versione base)skky88(v 3.1)Allegatifile immagine da inserire nella cartella pitcures , si deve chiamare"LE"(scritto in maiuscolo senza virgolette)Istruzioni per l'usoBasta crare un evento nella mappa e scrivere come commento "FIRE" o "TORCH" o "TORCH2" o "LIGHT" o "LIGHT2" o "GROUND" e sull evento verrà applicata la luce in questione...queste si possono anche rendre invisibili con l'ausilio della switch n°1(è possibile cambiare il valore di questa switch);fire e torch non vengono disattivate dalla switch perchè a me servono cosi(ma cmq e possibile dissativare pure queste o le altre basta chiedere e ve lo modifico) # ■ Light Effects XP V.3.2 #================================ # By: Near Fantastica # Date: 28.06.05 # Version: 3 # modified by:SKKY88 # DATE: 06.08.09 # bug risolto=ora le luci non si muovono più su mappe superiori a 20x15 # #================================ class Spriteset_Map alias les_spriteset_map_initalize initialize alias les_spriteset_map_dispose dispose alias les_spriteset_map_update update def initialize @light_effects = [] setup_lights les_spriteset_map_initalize update end def dispose les_spriteset_map_dispose for effect in @light_effects effect.light.dispose end @light_effects = [] end def update les_spriteset_map_update update_light_effects end def setup_lights for event in $game_map.events.values next if event.list == nil for i in 0...event.list.size if event.list[i].code == 108 and event.list[i].parameters == ["GROUND"] type = "GROUND" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 2 light_effects.light.zoom_y = 2 light_effects.light.opacity = 100 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["FIRE"] type = "FIRE" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 5 light_effects.light.zoom_y = 5 light_effects.light.opacity = 100 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT"] type = "LIGHT" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 1 light_effects.light.zoom_y = 1 light_effects.light.opacity = 150 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT2"] type = "LIGHT2" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 1 light_effects.light.zoom_y = 1 light_effects.light.opacity = 150 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["TORCH"] type = "TORCH" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 1 light_effects.light.zoom_y = 1 light_effects.light.opacity = 150 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["TORCH2"] type = "TORCH2" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 1 light_effects.light.zoom_y = 1 light_effects.light.opacity = 150 @light_effects.push(light_effects) end end end for effect in @light_effects case effect.type when "GROUND" effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 47 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 47 effect.light.blend_type = 1 when "FIRE" effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 144 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 144 effect.light.tone = Tone.new(255,-100,-255, 0) effect.light.blend_type = 1 when "LIGHT" effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 15 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.blend_type = 1 when "LIGHT2" effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 15 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.blend_type = 1 when "TORCH" effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 15 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.tone = Tone.new(255,-100,-255, 0) effect.light.blend_type = 1 when "TORCH2" effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 15 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.tone = Tone.new(255,-100,-255, 0) effect.light.blend_type = 1 end end end def update_light_effects if $game_switches[1] for effect in @light_effects next if effect.type == "FIRE" || effect.type == "TORCH" effect.light.visible = false end else for effect in @light_effects next if effect.type == "FIRE" || effect.type == "TORCH" effect.light.visible = true end end for effect in @light_effects case effect.type when "GROUND" effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 45 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 45 when "FIRE" effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 144 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 144 effect.light.opacity = rand(10) + 90 when "LIGHT" effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 15 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15 when "LIGHT2" effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 15 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15 when "TORCH" effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 15 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.opacity = rand(30) + 70 when "TORCH2" effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 15 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.opacity = rand(10) + 90 end end end end #================================ # ■ Light Effects Class #================================ class Light_Effect #-------------------------------------------------------------- attr_accessor :light attr_accessor :event attr_accessor :type #-------------------------------------------------------------- def initialize(event, type) @light = Sprite.new @light.bitmap = RPG::Cache.picture("LE.PNG") @light.visible = true @light.z = 1000 @event = event @type = type end end Bugs e Conflitti Notirisolto problema con le mappe superiori a 20x15 Link to comment Share on other sites More sharing options...
EvilSeep Posted August 6, 2009 Share Posted August 6, 2009 (edited) Buono ora funge... Mmmmh...per mettere che la luce si vede con uno switch? Perche non me lo legge se non e'in prima pagina...Mi serve perche ho fatto un ciclo giorno e notte ad eventi e mi servirebbe che appare di notte la luce... :P Edited August 6, 2009 by EvilSeep SEEP Universe su Steam:http://cdn.akamai.steamstatic.com/steam/apps/383630/capsule_184x69.jpg?t=1436537417 SEEP Universe: http://www.seepuniverse.com/ (Sito ufficiale) Blogging, dev log e vecchi progetti:SEEP Blog: http://www.seeproduction.blogspot.ie/ (DOWNLOAD dei nostri progetti)SEEP Bar: http://seepbar.blogspot.it/ (il bar viruale dove parlare di retrogaming e giochi indie) Link to comment Share on other sites More sharing options...
skky88 Posted August 6, 2009 Author Share Posted August 6, 2009 Buono ora funge... Mmmmh...per mettere che la luce si vede con uno switch? Perche non me lo legge se non e'in prima pagina...Mi serve perche ho fatto un ciclo giorno e notte ad eventi e mi servirebbe che appare di notte la luce... :P Vedi che basta solo che tu di notte attivi la switch n°1(o qualunque altra tu abbia impostato) per disattivare le luci...nell evento delle luci non devi mettere niente altro che il commento che preferisci...non serve creare una nuova pagina o se proprio la devi creare nella seconda pagina riscrivi il commento Link to comment Share on other sites More sharing options...
EvilSeep Posted August 6, 2009 Share Posted August 6, 2009 Vedi che basta solo che tu di notte attivi la switch n°1(o qualunque altra tu abbia impostato) per disattivare le luci...nell evento delle luci non devi mettere niente altro che il commento che preferisci...non serve creare una nuova pagina o se proprio la devi creare nella seconda pagina riscrivi il commento Pero'io gioco sugli ON/OFF...quindi non mi serve spegnerlo,ma accenderlo lo switch ma nn mi appara... =/ SEEP Universe su Steam:http://cdn.akamai.steamstatic.com/steam/apps/383630/capsule_184x69.jpg?t=1436537417 SEEP Universe: http://www.seepuniverse.com/ (Sito ufficiale) Blogging, dev log e vecchi progetti:SEEP Blog: http://www.seeproduction.blogspot.ie/ (DOWNLOAD dei nostri progetti)SEEP Bar: http://seepbar.blogspot.it/ (il bar viruale dove parlare di retrogaming e giochi indie) Link to comment Share on other sites More sharing options...
Squall_Leonheart Posted August 6, 2009 Share Posted August 6, 2009 Raga me lo copia tutto su una riga, potete postarlo in code? Iscriviti sul mio canale youtube -https://www.youtube.com/channel/UCYOxXExvlXiOFfYD1fTFpww?view_as=subscriberSeguimi su Instagram -https://www.instagram.com/ancestralguitarist/---------------------------------------------------------------------------------------------------------------------------------------Contest vinti---------------------------------------------------------------------------------------------------------------------------------------FACE CONTEST # 3BANNER CONTEST #69 Link to comment Share on other sites More sharing options...
Kingartur2 Posted August 7, 2009 Share Posted August 7, 2009 Raga me lo copia tutto su una riga, potete postarlo in code? Semplicemente apri un programma di scrittura(exp= blocco note) metti la finestra ingradita e incolla li il codice,poi lo copi dal blocco note e lo incolli nell'editor Per qualsiasi motivo non aprite questo spoiler. Ho detto di non aprirlo ! Se lo apri ancora esplode il mondo. Aaaaaa è un vizio. Contento? Il mondo è esploso, sono tutti morti per colpa della tua curiosità . Vuoi che ti venga anche il morbillo, la varicella e l'AIDS??? O bravo ora sei un malato terminale e nessuno ti puo curare, sono tutti morti ! Se clicchi ancora una volta il PC esplode. E dai smettila !! Uff!! Hai cliccato tante volte che ho dovuto sostituirlo con un codebox. http://s8.postimg.org/yntv9nxld/Banner.png http://img204.imageshack.us/img204/8039/sccontest3octpl3.gif Link to comment Share on other sites More sharing options...
Squall_Leonheart Posted August 7, 2009 Share Posted August 7, 2009 Grazie copia ora Iscriviti sul mio canale youtube -https://www.youtube.com/channel/UCYOxXExvlXiOFfYD1fTFpww?view_as=subscriberSeguimi su Instagram -https://www.instagram.com/ancestralguitarist/---------------------------------------------------------------------------------------------------------------------------------------Contest vinti---------------------------------------------------------------------------------------------------------------------------------------FACE CONTEST # 3BANNER CONTEST #69 Link to comment Share on other sites More sharing options...
Zosimos Posted August 7, 2009 Share Posted August 7, 2009 fire e torch non vengono disattivate dalla switch perchè a me servono cosi(ma cmq e possibile dissativare pure queste o le altre basta chiedere e ve lo modifico) Posso sapere se lo script attualmente inserito in cima al Topic è stato finalmente modificato in modo che si possano disattivare anche FIRE e TORCH? E in caso, come si può sistemare? Ho necessità che lo script funzioni per TUTTI gli effetti attraverso la switch. Gioco in Sviluppo: http://www.studibizantini.it/docs/Logo.png Blog: Ode to my Forthcoming Winter Riferimento Contest: http://rpg2s.net/gif/SCContest2Oct.gifx2 http://rpg2s.net/gif/SCContest1Oct.gifx1 Link to comment Share on other sites More sharing options...
giver Posted August 8, 2009 Share Posted August 8, 2009 Non può modificare il post perchè ha usato il tag CODEBOX, e quando si cerca di modificarlo o anche solo quotarlo, il pannello che dovrebbe contenere il post appare vuoto . . .Anche se basterebbe un copia-e-incolla più un minimo di riformattazione per rimediare. Per fare in modo che anche fuochi e torcie si spengano assieme alle altre luci quando lo switch è ON, basta eliminare l'istruzionenext if effect.type == "FIRE" || effect.type == "TORCH" SCRIPT RGSS (RPG Maker XP) VINTAGE LIBRARY [2018+]http://www.rpg2s.net/forum/index.php/topic/21892-vintagevisualsrewrite-enhanced-revised-victory-screen-v-35-da-autori-vari-a-giver/ http://www.rpg2s.net/forum/index.php/topic/21868-eventing-utility-simple-last-battle-events-fix-v-30-by-giver/ http://www.rpg2s.net/forum/index.php/topic/21853-vintagerewrite-constance-menu-per-4-personaggi-da-team-constance-a-giver/ http://www.rpg2s.net/forum/index.php/topic/22126-vintagedoveroso-necroedit-dummy-title-22u-update-per-crearlo-ad-eventi-su-mappa-by-giver/ http://www.rpg2s.net/forum/index.php/topic/22127-vintagevisuals-tale-chapters-save-system-20-by-giver/ Breaking (in ogni senso) News: "Treno deraglia per via del seno di Sakurai Aoi . . ." - Info nello spoiler !! http://afantasymachine.altervista.org/_altervista_ht/NOOOOOOOOOilMIOtreninooooo_500.gifNon riesco a smettere di essere affascinato da immagini come questa . . .http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpgAlcuni wallpapers che faccio ruotare sul mio vecchio PC . . .http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpghttp://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpghttp://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpghttp://afantasymachine.altervista.org/_altervista_ht/phantom_wp01_einzwei.jpg La parte più spassosa della mia vita è quando gli altri cercano di spiegarmi i miei pensieri . . . BBCode TestingTypeface & Size Link to comment Share on other sites More sharing options...
Zosimos Posted August 8, 2009 Share Posted August 8, 2009 Ti ringrazio. Davvero, ora funziona. Z Gioco in Sviluppo: http://www.studibizantini.it/docs/Logo.png Blog: Ode to my Forthcoming Winter Riferimento Contest: http://rpg2s.net/gif/SCContest2Oct.gifx2 http://rpg2s.net/gif/SCContest1Oct.gifx1 Link to comment Share on other sites More sharing options...
EvilSeep Posted August 8, 2009 Share Posted August 8, 2009 Una soluzione per far apparire una luce usando uno switch? :Ok: SEEP Universe su Steam:http://cdn.akamai.steamstatic.com/steam/apps/383630/capsule_184x69.jpg?t=1436537417 SEEP Universe: http://www.seepuniverse.com/ (Sito ufficiale) Blogging, dev log e vecchi progetti:SEEP Blog: http://www.seeproduction.blogspot.ie/ (DOWNLOAD dei nostri progetti)SEEP Bar: http://seepbar.blogspot.it/ (il bar viruale dove parlare di retrogaming e giochi indie) Link to comment Share on other sites More sharing options...
skky88 Posted August 9, 2009 Author Share Posted August 9, 2009 Una soluzione per far apparire una luce usando uno switch? allora basta che insersci queste stringhe di script:dopo la linea 37 inserisci: if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT3"] type = "LIGHT3" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 1 light_effects.light.zoom_y = 1 light_effects.light.opacity = 150 @light_effects.push(light_effects) end poi dopo la stringa :for effect in @light_effects case effect.typeinserisci: when "LIGHT3" effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 15 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.blend_type = 1 ora dopo la linea di codice: def update_light_effectsinserisci: if $game_switches[2]#(cambiala come piu ti piace...questa è l'ID della switch che ti attiva disattiva la luce) for effect in @light_effects next if effect.type == "LIGHT" || effect.type == "TORCH" || effect.type == "TORCH2" || effect.type == "FIRE" || effect.type == "LIGHT2" || effect.type == "GROUND" effect.light.visible = true end else for effect in @light_effects next if effect.type == "LIGHT" || effect.type == "TORCH" || effect.type == "TORCH2"|| effect.type == "FIRE" || effect.type == "LIGHT2" || effect.type == "GROUND" effect.light.visible = false end e ora per finire trova questa stringa di codice: for effect in @light_effects case effect.type e sotto aggiungici questa: when "LIGHT3" effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 15 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.blend_type = 1 Ci dovrebbe essere tutto...scusa per la mia mancata assistenza in questi giori ma sto elaborando la versione 4.0 con effetti luce per le finestre e per il sole calcolate dinamicamente (picture pre-renderizate ma angolazioni dinamiche in base all'orario)...è lo stesso motivo per cui non ti ho potuto dare le righe del codice dove inserci i vari script(ti saresti trovato righe tip2567 :spam: )...in caso di problemi chiedi pure... ps:dimenticavo nella luce che vuoi far apparire con la switch devi scriverci il commento "LIGHT3" e la switch è la numeo 2 (nello script che ti ho postato ti ho scritto 1 commento dove puoi cambiare la switch,inseriscilo e lo troverai) Link to comment Share on other sites More sharing options...
EvilSeep Posted August 10, 2009 Share Posted August 10, 2009 (edited) Figurati,anzi gentilissimo per rispondere! :spam: Ora lo provo subito! Edited August 10, 2009 by EvilSeep SEEP Universe su Steam:http://cdn.akamai.steamstatic.com/steam/apps/383630/capsule_184x69.jpg?t=1436537417 SEEP Universe: http://www.seepuniverse.com/ (Sito ufficiale) Blogging, dev log e vecchi progetti:SEEP Blog: http://www.seeproduction.blogspot.ie/ (DOWNLOAD dei nostri progetti)SEEP Bar: http://seepbar.blogspot.it/ (il bar viruale dove parlare di retrogaming e giochi indie) Link to comment Share on other sites More sharing options...
regan Posted September 2, 2009 Share Posted September 2, 2009 Ragazzi a me non funziona..qualcuno gentilmente mi posta l' ultima versione che funziona davvero? le ho provate tutte... se si riesce... Link to comment Share on other sites More sharing options...
MasterSion Posted September 2, 2009 Share Posted September 2, 2009 (edited) Io ho preso l'ultima versione trovata per topic e funziona benissimo. Edited September 2, 2009 by MasterSion http://img256.imageshack.us/img256/7639/ihateyou.gifUn uomo senza religione è come un pesce senza bicicletta.http://img18.imageshack.us/img18/3668/decasoft1.pnghttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif Link to comment Share on other sites More sharing options...
regan Posted September 2, 2009 Share Posted September 2, 2009 Mi fai un piacere? me la copi ed incolli qui? Link to comment Share on other sites More sharing options...
MasterSion Posted September 2, 2009 Share Posted September 2, 2009 [code]# ■ Light Effects XP V.3.2#================================# By: Near Fantastica# Date: 28.06.05# Version: 3# modified by:SKKY88# DATE: 06.08.09# bug risolto=ora le luci non si muovono più su mappe superiori a 20x15##================================ class Spriteset_Mapalias les_spriteset_map_initalize initializealias les_spriteset_map_dispose disposealias les_spriteset_map_update updatedef initialize@light_effects = []setup_lightsles_spriteset_map_initalizeupdateenddef disposeles_spriteset_map_disposefor effect in @light_effectseffect.light.disposeend@light_effects = []enddef updateles_spriteset_map_updateupdate_light_effectsenddef setup_lightsfor event in $game_map.events.valuesnext if event.list == nilfor i in 0...event.list.sizeif event.list[i].code == 108 and event.list[i].parameters == ["GROUND"]type = "GROUND"light_effects = Light_Effect.new(event,type)light_effects.light.zoom_x = 2light_effects.light.zoom_y = 2light_effects.light.opacity = 100@light_effects.push(light_effects)endif event.list[i].code == 108 and event.list[i].parameters == ["FIRE"]type = "FIRE"light_effects = Light_Effect.new(event,type)light_effects.light.zoom_x = 5light_effects.light.zoom_y = 5light_effects.light.opacity = 100@light_effects.push(light_effects)endif event.list[i].code == 108 and event.list[i].parameters == ["LIGHT"]type = "LIGHT"light_effects = Light_Effect.new(event,type)light_effects.light.zoom_x = 1light_effects.light.zoom_y = 1light_effects.light.opacity = 150@light_effects.push(light_effects)endif event.list[i].code == 108 and event.list[i].parameters == ["LIGHT2"]type = "LIGHT2"light_effects = Light_Effect.new(event,type)light_effects.light.zoom_x = 1light_effects.light.zoom_y = 1light_effects.light.opacity = 150@light_effects.push(light_effects)endif event.list[i].code == 108 and event.list[i].parameters == ["TORCH"]type = "TORCH"light_effects = Light_Effect.new(event,type)light_effects.light.zoom_x = 1light_effects.light.zoom_y = 1light_effects.light.opacity = 150@light_effects.push(light_effects)endif event.list[i].code == 108 and event.list[i].parameters == ["TORCH2"]type = "TORCH2"light_effects = Light_Effect.new(event,type)light_effects.light.zoom_x = 1light_effects.light.zoom_y = 1light_effects.light.opacity = 150@light_effects.push(light_effects)endendendfor effect in @light_effectscase effect.typewhen "GROUND"effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 47effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 47effect.light.blend_type = 1when "FIRE"effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 144effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 144effect.light.tone = Tone.new(255,-100,-255, 0)effect.light.blend_type = 1when "LIGHT"effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 15effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15effect.light.blend_type = 1when "LIGHT2"effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 15effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15effect.light.blend_type = 1when "TORCH"effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 15effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15effect.light.tone = Tone.new(255,-100,-255, 0)effect.light.blend_type = 1when "TORCH2"effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 15effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15effect.light.tone = Tone.new(255,-100,-255, 0)effect.light.blend_type = 1endendenddef update_light_effectsif $game_switches[1]for effect in @light_effects effect.light.visible = falseendelsefor effect in @light_effectsnext if effect.type == "FIRE" || effect.type == "TORCH"effect.light.visible = trueendendfor effect in @light_effectscase effect.typewhen "GROUND"effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 45effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 45when "FIRE"effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 144effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 144effect.light.opacity = rand(10) + 90when "LIGHT"effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 15effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15when "LIGHT2"effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 15effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15when "TORCH"effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 15effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15effect.light.opacity = rand(30) + 70when "TORCH2"effect.light.x = (-0.25 * $game_map.display_x) + (effect.event.x * 32) - 15effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15effect.light.opacity = rand(10) + 90endendendend #================================# ■ Light Effects Class#================================ class Light_Effect#--------------------------------------------------------------attr_accessor :lightattr_accessor :eventattr_accessor :type#--------------------------------------------------------------def initialize(event, type)@light = Sprite.new@light.bitmap = RPG::Cache.picture("LE.PNG")@light.visible = true@light.z = 1000@event = event@type = typeendend[/code] Ecco con la switch si disattivano tutti gli efetti http://img256.imageshack.us/img256/7639/ihateyou.gifUn uomo senza religione è come un pesce senza bicicletta.http://img18.imageshack.us/img18/3668/decasoft1.pnghttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif Link to comment Share on other sites More sharing options...
regan Posted September 2, 2009 Share Posted September 2, 2009 (edited) Niente da fare..mi da errore....sulla linea 158, name errorundefined local variable or method for nil NilClass edit: ora senza che abbia fato nulla non me lo da più ma mi da syntax error dopo l' ultimo end : | Edited September 2, 2009 by regan Link to comment Share on other sites More sharing options...
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