Jump to content
Rpg²S Forum

*LIGHT EFFECTS XP V 3.1


skky88
 Share

Recommended Posts

LIGHT EFFECT XP V 3.1

Descrizione

Non è altro che uno script che implementa delle luci nel gioco

Autori

Near Fantastica (versione base)

skky88(v 3.1)

Allegati

file immagine da inserire nella cartella pitcures , si deve chiamare"LE"(scritto in maiuscolo senza virgolette)

post-3495-1249483016.png

Istruzioni per l'uso

Basta 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 Noti

N/A (o almeno fino ad ora)

Edited by Apo
Link to comment
Share on other sites

  • Replies 81
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Bellissimo lo stavo cercando proprio oggi! Grazie mille!! :sisi: :sisi:

 

Edit: Pero'ho travato un problema,nelle mappe piu'grandi di 20 15 camminano con l eroe. =S

Edited 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

alla fine, è lo stesso problema che si ha con gli eventi, a differenza che quello ad eventi si può risolvere... Edited by tidus00

http://i46.tinypic.com/260qs1l.jpghttp://i48.tinypic.com/21owyt0.jpghttp://i45.tinypic.com/oj12x5.jpg

http://i45.tinypic.com/oj12x5.jpghttp://i48.tinypic.com/2qanw9v.jpghttp://i45.tinypic.com/oj12x5.jpg

http://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 veda

Un gioco così ben fatto da farti sballare la testa! XD

 

 

 

 

http://img27.imageshack.us/img27/8540/dsbar.png

http://img294.imageshack.us/img294/6876/nostalebar.png

http://img90.imageshack.us/img90/2158/tbars.png

http://i40.tinypic.com/soqvb8.jpg

http://i45.tinypic.com/29duu1l.jpg

http://img237.imageshack.us/img237/2482/30275.png

http://img182.imageshack.us/img182/8/rpgxpbarrpgmzv1.png

http://img195.imageshack.us/img195/6998/userbarannette.png

http://i48.tinypic.com/awdylh.jpg

Link to comment
Share on other sites

 

#================================# ■ 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+]


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.gif


Non riesco a smettere di essere affascinato da immagini come questa . . .

http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpg


Alcuni wallpapers che faccio ruotare sul mio vecchio PC . . .


http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpg

http://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpg
http://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpg
http://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 Testing


Typeface & Size



Link to comment
Share on other sites

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

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

LIGHT EFFECT XP V 3.2

Descrizione

Non è altro che uno script che implementa delle luci nel gioco


Autori
Near Fantastica (versione base)

skky88(v 3.1)


Allegati

file immagine da inserire nella cartella pitcures , si deve chiamare"LE"(scritto in maiuscolo senza virgolette)



Istruzioni per l'uso

Basta 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 Noti

risolto problema con le mappe superiori a 20x15

Link to comment
Share on other sites

Buono ora funge... :sisi:

 

 

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 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

Buono ora funge... :sisi:

 

 

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

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

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=subscriber

Seguimi su Instagram -

https://www.instagram.com/ancestralguitarist/

---------------------------------------------------------------------------------------------------------------------------------------
Contest vinti
---------------------------------------------------------------------------------------------------------------------------------------

FACE CONTEST # 3
BANNER CONTEST #69

Link to comment
Share on other sites

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

Grazie copia ora

Iscriviti sul mio canale youtube -

https://www.youtube.com/channel/UCYOxXExvlXiOFfYD1fTFpww?view_as=subscriber

Seguimi su Instagram -

https://www.instagram.com/ancestralguitarist/

---------------------------------------------------------------------------------------------------------------------------------------
Contest vinti
---------------------------------------------------------------------------------------------------------------------------------------

FACE CONTEST # 3
BANNER CONTEST #69

Link to comment
Share on other sites

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

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'istruzione

next if effect.type == "FIRE" || effect.type == "TORCH"

 


SCRIPT RGSS (RPG Maker XP) VINTAGE LIBRARY [2018+]


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.gif


Non riesco a smettere di essere affascinato da immagini come questa . . .

http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpg


Alcuni wallpapers che faccio ruotare sul mio vecchio PC . . .


http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpg

http://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpg
http://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpg
http://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 Testing


Typeface & Size



Link to comment
Share on other sites

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

Una soluzione per far apparire una luce usando uno switch? :sisi:

 

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.type

inserisci:

 

 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_effects

inserisci:

 

 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

Figurati,anzi gentilissimo per rispondere! :spam:

Ora lo provo subito! :sisi:

Edited 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

  • 4 weeks later...
Io ho preso l'ultima versione trovata per topic e funziona benissimo. Edited by MasterSion

http://img256.imageshack.us/img256/7639/ihateyou.gif

Un uomo senza religione è come un pesce senza bicicletta.

http://img18.imageshack.us/img18/3668/decasoft1.png

http://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif

Link to comment
Share on other sites

[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_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
 
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
[/code]

 

Ecco con la switch si disattivano tutti gli efetti

http://img256.imageshack.us/img256/7639/ihateyou.gif

Un uomo senza religione è come un pesce senza bicicletta.

http://img18.imageshack.us/img18/3668/decasoft1.png

http://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif

Link to comment
Share on other sites

Niente da fare..mi da errore....

sulla linea 158, name error

undefined 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 by regan
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...