Pomogła: 232 razy Dołączyła: 18 Wrz 2007 Posty: 2424
Wysłany: Pon 20 Lip, 2009 19:49
Gąsienica
~ Gąsienica ~
Krótki opis
Skrypt powoduje, że aktualne osoby w drużynie poruszają się gęsiego po mapie (patrz screenshot).
Autor skryptu
Trickster
Tłumaczenie i poprawki
Ayene [yurika@o2.pl]
Kompatybilność
Tylko VX
Skrypt
Spoiler:
Kod:
# =========================================================
# ~ Gąsienica ~
# Data publikacji: 20.07.2009
# Autor: Trickster
# Tłumaczenie i poprawki: Ayene [yurika@o2.pl]
# Zapraszamy na stronę Ultima Forum - http://www.ultimateam.pl
# =========================================================
# Instalacja: Umieść ten skrypt nad Main w Edytorze Skryptu.
# =========================================================
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# --------------------------- POCZĄTEK SKRYPTU ---------------------------------
module TT
# ---------------------------- POCZĄTEK EDYCJI ---------------------------------
# ID przełącznika, dzięki któremu można wyłączyć gąsienicę w dowolnym momencie
# gry. Przełącznik ON - wyłącza gąsienice, OFF - ponownie włącza.
ID_PRZEŁĄCZNIKA_GĄSIENICA = 2
# maksymalna ilość osób w gąsienicy (domyślnie - 4, czyli maksymalna ilość
# bohaterów w drużynie)
MAKSYMALNA_DŁUGOŚĆ = 4
# ----------------------------- KONIEC EDYCJI ----------------------------------
end
# -----------NIE EDYTUJ PONIŻEJ, CHYBA ŻE WIESZ CO ROBISZ ^^--------------------
class Game_Player
#--------------------------------------------------------------------------
# * W dół
#--------------------------------------------------------------------------
def move_down(turn_enabled = true)
super(turn_enabled)
end
#--------------------------------------------------------------------------
# * W lewo
#--------------------------------------------------------------------------
def move_left(turn_enabled = true)
super(turn_enabled)
end
#--------------------------------------------------------------------------
# * W prawo
#--------------------------------------------------------------------------
def move_right(turn_enabled = true)
super(turn_enabled)
end
#--------------------------------------------------------------------------
# * W górę
#--------------------------------------------------------------------------
def move_up(turn_enabled = true)
super(turn_enabled)
end
#--------------------------------------------------------------------------
# * W dolne lewo
#--------------------------------------------------------------------------
def move_lower_left
super
end
#--------------------------------------------------------------------------
# * W dolne prawo
#--------------------------------------------------------------------------
def move_lower_right
super
end
#--------------------------------------------------------------------------
# * W górne lewo
#--------------------------------------------------------------------------
def move_upper_left
super
end
#--------------------------------------------------------------------------
# * W górne prawo
#--------------------------------------------------------------------------
def move_upper_right
super
end
end
class Game_Follower < Game_Character
#--------------------------------------------------------------------------
# * Przykładowe zmienne
#--------------------------------------------------------------------------
attr_reader :actor
attr_accessor :move_speed
#--------------------------------------------------------------------------
# * Rozpoczęcie
#--------------------------------------------------------------------------
def initialize(actor)
super()
@through = true
@actor = actor
end
#--------------------------------------------------------------------------
# * Ustawienie bohatera
#--------------------------------------------------------------------------
def actor=(actor)
@actor = actor
setup
end
#--------------------------------------------------------------------------
# * Ustawienia
#--------------------------------------------------------------------------
def setup
if @actor != nil
@character_name = $game_actors[@actor].character_name
@character_index = $game_actors[@actor].character_index
else
@character_name = ""
@character_index = 0
end
@opacity = 255
@blend_type = 0
@priority_type = 1
end
#--------------------------------------------------------------------------
# * Ekran Z
#--------------------------------------------------------------------------
def screen_z
if $game_player.x == @x and $game_player.y == @y
return $game_player.screen_z - 1
end
super
end
#--------------------------------------------------------------------------
# * Determinanty określonych zdarzeń
#--------------------------------------------------------------------------
def check_event_trigger_here(triggers)
result = false
return result
end
def check_event_trigger_there(triggers)
result = false
return result
end
def check_event_trigger_touch(x, y)
result = false
return result
end
end
class Spriteset_Map
alias_method :spriteset_map_create_characters, :create_characters
def create_characters
spriteset_map_create_characters
$game_party.followers.each do |char|
@character_sprites << Sprite_Character.new(@viewport1, char)
end
end
end
class Game_Party
#--------------------------------------------------------------------------
# * Przykładowe zmienne
#--------------------------------------------------------------------------
attr_reader :followers
#--------------------------------------------------------------------------
# * Rozpoczęcie
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_party_initialize, :initialize
def initialize
trick_caterpillar_party_initialize
@followers = Array.new(TT::MAKSYMALNA_DŁUGOŚĆ - 1) {Game_Follower.new(nil)}
@move_list = []
end
#--------------------------------------------------------------------------
# * Aktualizacja podążających
#--------------------------------------------------------------------------
def update_followers
flag = $game_player.transparent || $game_switches[TT::ID_PRZEŁĄCZNIKA_GĄSIENICA]
@followers.each_with_index do |char, i|
char.actor = @actors[i + 1]
char.move_speed = $game_player.move_speed
if $game_player.dash?
char.move_speed += 1
end
char.update
char.transparent = flag
end
end
#--------------------------------------------------------------------------
# * Przesuń w kierunku drużyny
#--------------------------------------------------------------------------
def moveto_party(x, y)
@followers.each {|char| char.moveto(x, y)}
@move_list.clear
end
#--------------------------------------------------------------------------
# * Przesuń drużynę
#--------------------------------------------------------------------------
def move_party
@move_list.each_index do |i|
if @followers[i] == nil
@move_list[i...@move_list.size] = nil
next
end
case @move_list[i].type
when 2
@followers[i].move_down(*@move_list[i].args)
when 4
@followers[i].move_left(*@move_list[i].args)
when 6
@followers[i].move_right(*@move_list[i].args)
when 8
@followers[i].move_up(*@move_list[i].args)
when 1
@followers[i].move_lower_left
when 3
@followers[i].move_lower_right
when 7
@followers[i].move_upper_left
when 9
@followers[i].move_upper_right
when 5
@followers[i].jump(*@move_list[i].args)
end
end
end
#--------------------------------------------------------------------------
# * Dodaj listę ruchów
#--------------------------------------------------------------------------
def update_move(type, *args)
move_party
@move_list.unshift(Game_MoveListElement.new(type, args))
end
end
class Game_MoveListElement
#--------------------------------------------------------------------------
# * Rozpoczęcie
#--------------------------------------------------------------------------
def initialize(type, args)
@type = type
@args = args
end
#--------------------------------------------------------------------------
# * Typ
#--------------------------------------------------------------------------
def type
return @type
end
#--------------------------------------------------------------------------
# * Argumenty
#--------------------------------------------------------------------------
def args
return @args
end
end
class Game_Player
#--------------------------------------------------------------------------
# * Przykładowe zmienne
#--------------------------------------------------------------------------
attr_reader :move_speed
#--------------------------------------------------------------------------
# * Aktualizacja
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_update, :update
def update
$game_party.update_followers
trick_caterpillar_player_update
end
#--------------------------------------------------------------------------
# * Przesuń do
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_moveto, :moveto
def moveto(x, y)
$game_party.moveto_party(x, y)
trick_caterpillar_player_moveto(x, y)
end
#--------------------------------------------------------------------------
# * W dół
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_move_down, :move_down
def move_down(turn_enabled = true)
if passable?(@x, @y+1)
$game_party.update_move(2, turn_enabled)
end
trick_caterpillar_player_move_down(turn_enabled)
end
#--------------------------------------------------------------------------
# * W lewo
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_move_left, :move_left
def move_left(turn_enabled = true)
if passable?(@x-1, @y)
$game_party.update_move(4, turn_enabled)
end
trick_caterpillar_player_move_left(turn_enabled)
end
#--------------------------------------------------------------------------
# * W prawo
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_move_right, :move_right
def move_right(turn_enabled = true)
if passable?(@x+1, @y)
$game_party.update_move(6, turn_enabled)
end
trick_caterpillar_player_move_right(turn_enabled)
end
#--------------------------------------------------------------------------
# * W górę
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_move_up, :move_up
def move_up(turn_enabled = true)
if passable?(@x, @y-1)
$game_party.update_move(8, turn_enabled)
end
trick_caterpillar_player_move_up(turn_enabled)
end
#--------------------------------------------------------------------------
# * W dolne lewo
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_move_lower_left, :move_lower_left
def move_lower_left
if passable?(@x - 1, @y) and passable?(@x, @y + 1)
$game_party.update_move(1)
end
trick_caterpillar_player_move_lower_left
end
#--------------------------------------------------------------------------
# * W dolne prawo
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_move_lower_right, :move_lower_right
def move_lower_right
if passable?(@x + 1, @y) and passable?(@x, @y + 1)
$game_party.update_move(3)
end
trick_caterpillar_player_move_lower_right
end
#--------------------------------------------------------------------------
# * W górne lewo
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_move_upper_left, :move_upper_left
def move_upper_left
if passable?(@x - 1, @y) and passable?(@x, @y - 1)
$game_party.update_move(7)
end
trick_caterpillar_player_move_upper_left
end
#--------------------------------------------------------------------------
# * W górne prawo
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_move_upper_right, :move_upper_right
def move_upper_right
if passable?(@x + 1, @y) and passable?(@x, @y - 1)
$game_party.update_move(9)
end
trick_caterpillar_player_move_upper_right
end
#--------------------------------------------------------------------------
# * Skok
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_jump, :jump
def jump(x_plus, y_plus)
new_x = @x + x_plus
new_y = @y + y_plus
if (x_plus == 0 and y_plus == 0) or passable?(new_x, new_y)
$game_party.update_move(5, x_plus, y_plus)
end
trick_caterpillar_player_jump(x_plus, y_plus)
end
end
# --------------------------- KONIEC SKRYPTU -----------------------------------
Demo
niepotrzebne
Screenshot
Instrukcja
1. Wklej skrypt nad "Main" w Edytorze Skryptu.
2. Reszta instrukcji znajduje się w treści skryptu.
postanowiłem skorzystac z gąsienicy ale mam mały problem.
Da radę wyłaczyc ją w trakcie gry bo nie za bardzo mi pasuje w niektórych momentach. widzę że jest jakiś przełacznik ale robię tak jak napisane i nie wychodzi.
To proste, dajesz odpowiednie zdarzenie, potem control switches na stronie pierwszej i ustawiasz przełącznik nr 2 (bo taki jest domyślny w skrypcie z gąsienicą) najlepiej to nazwij go sobie jakoś np gąsienica. Dodatkowo ustaw czy ma być ON czy OFF, a w skrypcie jest napisane:
Kod:
# ID przełącznika, dzięki któremu można wyłączyć gąsienicę w dowolnym momencie
# gry. Przełącznik ON - wyłącza gąsienice, OFF - ponownie włącza.
ID_PRZEŁĄCZNIKA_GĄSIENICA = 2
________________________ Nie ma śniegu, a na ulicach pełno bałwanów ^^
Pomógł: 4 razy Dołączył: 30 Sty 2011 Posty: 60 Skąd: Du Weldenvarden
Wysłany: Sob 26 Mar, 2011 12:22
Tak dalej w niej jest.
________________________ WygrajGry.pl http://wygrajgry.pl/ref/228569 Zgarniaj oryginalne gry komputerowe za darmo!
Weź udział w konkursie i wygrywaj najnowsze gry takie jak:
Cytat:
- Far Cry 3
- Assassin's Creed 3
- Call of Duty: Black Ops 2
- Medal of Honor: Warfighter
- Need for Speed: Most Wanted
//Post powinien wyglądać tak:
To jest bez sensu! Nie umiem tego wkleić! Mam spolszczoną wersję i najlepiej by było, jakby to się samo instalowało, czy coś! Jak to wkleić?
//Post NIE powinien wyglądać tak:
Spoiler:
To jest bez sensu! NIE UMIEM TEGO WKLEIĆ! MAM SPOLSZCZONĄ WERSJĘ I NAJLEPIEJ BY BYŁO JAKBY TO SIE SAMO INSTALOWAŁO CZY COŚ! JAK TO WKLEIĆ?
Ostatnio zmieniony przez Angius Wto 07 Cze, 2011 16:35, w całości zmieniany 1 raz
Pomógł: 1 raz Dołączył: 07 Sty 2012 Posty: 46 Skąd: Polska
Wysłany: Sro 18 Sty, 2012 21:53
Można było to zrobić jak ja zrobiłem ABSa. Używasz klasy, a tam jest przełącznik odpowiedzialny za wyświetlanie gąsienicy. Wtedy ten skrypt byłby idealny do klona gry "Chrono Trigger" (bądź kontynuacji tejże gry), gdzie przewijają się sekwencje ABS. Wtedy właśnie gąsienica ustawia się na "OFF". Komendy operacji gąsienicą to mogą być "ON" (gąsienica włączona), "OFF" (gąsienica wyłączona), "Auto" (gąsienica włączona poza ABSem).
________________________ Ryzykując, że zrobisz super gniota, możesz zrobić super hit lub super gniota.
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