Ogłoszenie 

Uwaga! To forum jest w trybie offline.
Wszelką pomoc uzyskasz pod adresem
forum.ultimateam.pl


Administracja Forum


Poprzedni temat «» Następny temat
Zamknięty przez: Ayene
Nie 27 Lis, 2011 12:51
[VX] GubiD's Tactical Battle System PL
Autor Wiadomość
Grosik 



Dołączył: 18 Sie 2011
Posty: 1
Wysłany: Pią 19 Sie, 2011 20:20
[VX] GubiD's Tactical Battle System PL
Siemka, ostatnio zacząłem się bawić w rm vx,
i chciałem sobie przetestować w temacie wymieniony battle system.
Wszystkie skrypty przeniosłem, obrazki też następnie odpalam grę
wszystko jest ok dopóki nie ma ataku. tzn. jeśli ja dojde do przeciwnika
i zaatakuje go to wywala błąd, tak samo jeśli przeciwnik podejdzie do mnie.
Oto ten błąd:

A i jakby co to niczego nei zmieniałem w konfiguracjach
bo nie wiem jak, być może to jest przyczyna problemu.

A tutaj zakładka z której wywala błąd
(Bitmap/AnimObj)

Spoiler:

#------------------------------------------------------------------------------
# This modification is so that you can spawn new events mainly for animations in
# the battle system. Miss and summons will not work if this is not here.
#------------------------------------------------------------------------------

class Anim_Miss < Game_Event
def initialize(type = 0, anim_id = 0)
@type = type
@anim_id = anim_id
@played = false
anim = RPG::Event.new(0,0)
super($game_map.map_id, anim)
end

def animated?
return false
end

def start_anim

case @type
when 0
@animation_id = GTBS::MISS_ANIMATION #Animation ID of MISS!.. for spells that miss
when 1
@animation_id = GTBS::SUMMON_ANIM_ID #Animation ID of SPAWN.. for summons (RAISE)
else
@animation_id = @anim_id
end
@played = true
end

def place(x,y)
moveto(x,y)
@id = $game_map.events.size + 1
$game_system.battle_events[@id] = self
$scene.spriteset.event_sprites.push(Sprite_Character.new($scene.spriteset.viewport1,self))
@sprite = $scene.spriteset.event_sprites.last
end

#alias anim_miss_update update
def update
super()
if @played == true and !@sprite.animation?
$scene.spriteset.event_sprites.delete(@sprite)
$game_map.events.delete(self)
end
end
end

class Turn_Sprite < Sprite_Base
def initialize(viewport)
@_damage_duration = 0
super(viewport)
end

def dispose_damage
if @_damage_sprite != nil
@_damage_sprite.bitmap.dispose
@_damage_sprite.dispose
@_damage_sprite = nil
@_damage_duration = 0
end
end

def update
update_damage
super
end

def update_damage
if @_damage_duration > 0
@_damage_duration -= 1
case @_damage_duration
when 38..39
@_damage_sprite.y -= 4
when 36..37
@_damage_sprite.y -= 2
when 34..35
@_damage_sprite.y += 2
when 28..33
@_damage_sprite.y += 4
end
@_damage_sprite.opacity = 256 - (12 - @_damage_duration) * 32
if @_damage_duration == 0
dispose_damage
end
end
end

def damage(value, critical)
dispose_damage
if value.is_a?(Numeric)
damage_string = value.abs.to_s
else
damage_string = value.to_s
end
bitmap = Bitmap.new(160, 48)
bitmap.font.name = "Arial Black"
bitmap.font.size = 32
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
if value.is_a?(Numeric) and value < 0
bitmap.font.color.set(176, 255, 144)
else
bitmap.font.color.set(255, 255, 255)
end
bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
if critical
bitmap.font.size = 20
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text(-1, -1, 160, 20, "CRITICAL", 1)
bitmap.draw_text(+1, -1, 160, 20, "CRITICAL", 1)
bitmap.draw_text(-1, +1, 160, 20, "CRITICAL", 1)
bitmap.draw_text(+1, +1, 160, 20, "CRITICAL", 1)
bitmap.font.color.set(255, 255, 255)
bitmap.draw_text(0, 0, 160, 20, "CRITICAL", 1)
end
@_damage_sprite = ::Sprite.new(self.viewport)
@_damage_sprite.bitmap = bitmap
@_damage_sprite.ox = 80
@_damage_sprite.oy = 20
@_damage_sprite.x = self.x
@_damage_sprite.y = self.y - (self.oy/1.5)
@_damage_sprite.z = 3000
@_damage_duration = 60
end

def doom_pop(value) #Used only for doom right now.
dispose_damage
if value.is_a?(Numeric)
damage_string = value.abs.to_s
else
damage_string = value.to_s
end
bitmap = Bitmap.new(160, 48)
bitmap.font.name = GTBS.font
bitmap.font.size = 20
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
if value.is_a?(Numeric) and value < 0
bitmap.font.color.set(176, 255, 144)
else
bitmap.font.color.set(255, 255, 255)
end
bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
@_damage_sprite = ::Sprite.new(self.viewport)
@_damage_sprite.bitmap = bitmap
@_damage_sprite.ox = 80
@_damage_sprite.oy = 20
@_damage_sprite.x = self.x
@_damage_sprite.y = self.y - (self.oy / 1.5)
@_damage_sprite.z = 3000
@_damage_duration = 40
end

def start_animation(animation, mirror = false, direction = 8)
@direction = direction
@turnable = animation.name.downcase.include?("[true]")
@updated = false
super(animation, mirror)
end


def animation_set_sprites(frame)
super(frame)
for i in 0..15
sprite = @animation_sprites[i]
if @turnable
d = @direction
sprite.angle += (d == 8 ? 0 : d == 6 ? 270 : d == 4 ? 90 : 180)
end
end
end
end

class Bitmap
def draw_outline_text(x,y,w,h,text,align=0,clear = 1)
color = self.font.color.clone
if clear == 1
self.font.color = Color.new(50,50,50,200)
elsif clear == 0
self.font.color = Color.new(0,0,0)
end
self.draw_text(x+1,y+1,w,h,text,align)
self.draw_text(x+1,y-1,w,h,text,align)
self.draw_text(x-1,y-1,w,h,text,align)
self.draw_text(x-1,y+1,w,h,text,align)
self.draw_text(x-1,y,w,h,text,align)
self.draw_text(x+1,y,w,h,text,align)
self.draw_text(x,y+1,w,h,text,align)
self.draw_text(x,y-1,w,h,text,align)
self.font.color = color
self.draw_text(x,y,w,h,text,align)
end

def gradation_rect(x, y, width, height, color1, color2, align = 0)
if align == 0
for i in x...x + width
red = color1.red + (color2.red - color1.red) * (i - x) / (width - 1)
green = color1.green +
(color2.green - color1.green) * (i - x) / (width - 1)
blue = color1.blue +
(color2.blue - color1.blue) * (i - x) / (width - 1)
alpha = color1.alpha +
(color2.alpha - color1.alpha) * (i - x) / (width - 1)
color = Color.new(red, green, blue, alpha)
fill_rect(i, y, 1, height, color)
end
elsif align == 1
for i in y...y + height
red = color1.red +
(color2.red - color1.red) * (i - y) / (height - 1)
green = color1.green +
(color2.green - color1.green) * (i - y) / (height - 1)
blue = color1.blue +
(color2.blue - color1.blue) * (i - y) / (height - 1)
alpha = color1.alpha +
(color2.alpha - color1.alpha) * (i - y) / (height - 1)
color = Color.new(red, green, blue, alpha)
fill_rect(x, i, width, 1, color)
end
elsif align == 2
for i in x...x + width
for j in y...y + height
red = color1.red + (color2.red - color1.red) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
green = color1.green + (color2.green - color1.green) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
blue = color1.blue + (color2.blue - color1.blue) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
alpha = color1.alpha + (color2.alpha - color1.alpha) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
color = Color.new(red, green, blue, alpha)
set_pixel(i, j, color)
end
end
elsif align == 3
for i in x...x + width
for j in y...y + height
red = color1.red + (color2.red - color1.red) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
green = color1.green + (color2.green - color1.green) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
blue = color1.blue + (color2.blue - color1.blue) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
alpha = color1.alpha + (color2.alpha - color1.alpha) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
color = Color.new(red, green, blue, alpha)
set_pixel(i, j, color)
end
end
end
end
end

________________________
Grosz do grosza a będą 2 grosze
 
 
Aruka21 




Preferowany:
RPG Maker VX

Pomógł: 2 razy
Dołączył: 23 Paź 2010
Posty: 129
Skąd: Samo dno piekieł.
Wysłany: Czw 27 Paź, 2011 18:52
Witam.
Jedyne co mogę Ci poradzić to skopiuj wszystko do projektu ze skryptem (demko albo coś) to zazwyczaj pomaga.

Pozdrawiam Aruka21 :papa:
________________________
Mój aktualny projekt: Edeon
Oto link:http://www.ultimateam.pl/viewtopic.php?p=73129#73129

Zyska Sławę Królem Będzie,
Kto Się Uświadomi We Śnie,
Kto Zdobędzie Szczyt W Błękicie,
Będzie Tym Co Jest Na Szczycie.
 
 
 
Angius 

Nie wkurzać



Preferowany:
RPG Maker VX

Pomógł: 104 razy
Dołączył: 30 Paź 2010
Posty: 1276
Skąd: wROCK
Wysłany: Czw 27 Paź, 2011 19:31
Albo skoro robisz tę grę od zera, to buduj ją na demie Gubida :mrgreen:
________________________
"Na trolla pewne są tylko dwie pewne metody, jedna samopowtarzalna i druga, wymagająca przeładowania ręcznego."


 
 
Aruka21 




Preferowany:
RPG Maker VX

Pomógł: 2 razy
Dołączył: 23 Paź 2010
Posty: 129
Skąd: Samo dno piekieł.
Wysłany: Wto 01 Lis, 2011 20:13
A co napisałem post wyżej nad twoim Angius ? :mrgreen:
________________________
Mój aktualny projekt: Edeon
Oto link:http://www.ultimateam.pl/viewtopic.php?p=73129#73129

Zyska Sławę Królem Będzie,
Kto Się Uświadomi We Śnie,
Kto Zdobędzie Szczyt W Błękicie,
Będzie Tym Co Jest Na Szczycie.
 
 
 
Angius 

Nie wkurzać



Preferowany:
RPG Maker VX

Pomógł: 104 razy
Dołączył: 30 Paź 2010
Posty: 1276
Skąd: wROCK
Wysłany: Wto 01 Lis, 2011 20:14
Aaa... Wybacz, zrozumiałem, żeby skopiował wszystko z projektu z demem :mrgreen:
________________________
"Na trolla pewne są tylko dwie pewne metody, jedna samopowtarzalna i druga, wymagająca przeładowania ręcznego."


 
 
Wyświetl posty z ostatnich:   
Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Nie możesz załączać plików na tym forum
Możesz ściągać załączniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  

Powered by phpBB modified by Przemo © 2003 phpBB Group | Template Klam by Ayene