Per 2016, RMID pindah ke RMID Discord (Invite link dihapus untuk mencegah spambot -Theo @ 2019). Posting sudah tidak bisa dilakukan lagi.
Mohon maaf atas ketidaknyamanannya dan mohon kerjasamanya.

Share | 
 

 [Xp] Advanced Move Route

Topik sebelumnya Topik selanjutnya Go down 
[Xp] Advanced Move Route Empty2011-02-22, 12:01
Post[Xp] Advanced Move Route
#1
LiTTleDRAgo 
Senior
Senior
LiTTleDRAgo

Level 5
Posts : 712
Thanked : 27
Engine : RMXP
Skill : Skilled
Type : Scripter
Awards:
[Xp] Advanced Move Route Vide
Advanced Move Route
Versi: 1.00
Tipe: Misc Add-on


Pengenalan

Karena ga puas ama set move routenya yg dikit banget commandnya makanya gw bikin skrip ini


Fitur


  • Zoom character
  • Play animation
  • Ganti autonomous movement
  • Ganti Hue
  • Control Variable
  • Control Self Switch
  • Erase event



Screenshots

Apa yg mesti di screenshot?


Demo

If requested (probably)


Scripts

Code:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Advanced Move Route
# Version: 1.00
# Author : LiTTleDRAgo
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Explanation :

# This script adds some function to Set Move Route Command
#
#
#
# Instruction :

# At event page look at Set Move Route, type the Script command 
#
#
#
#
# Syntax Available:
#
# *Play animation at event:
#  ---------------------------------
#  anime(x)
#  ---------------------------------
#    x = Animation ID at database
#
#  example :
#  anime(145) # > This will play the animation with ID 145 to the target event
#             
#
#
# *Zoom:
#  ---------------------------------
#  zoom(x,y)
#  ---------------------------------
#    x = Zoom vertical
#    y = Zoom horizontal     
#
#  example :
#  zoom(1.5,1.5) # > This will zoom the target event 150%
#                # horizontal and vertical
#             
#
#
# *Change Move Type:
#  ---------------------------------
#  change_move_type(x)
#  ---------------------------------
#  x =  0 = Fixed
#        1 = Random
#        2 = Approach
#        3 = Custom  > too complicated

#  example :
#  change_move_type(1) # > This will set  the target event autonomous movement
#                      # to random
#             
#
#
# *Change Hue:
#  ---------------------------------
#  change_hue(x)
#  ---------------------------------
#  x =  0 - 255
#       
#     
#
# *Control Variable: (still beta)
#  ---------------------------------
#  variable(var_id, value, inc, multiply)
#  ---------------------------------
#    var_id = variable ID
#    value  = set fixed falue (only work if inc and multiply is 0)
#    inc    = to increase/decrease previous value
#            (only work if value and multiply is 0)
#    multiply = to multiply previous value
#              (only work if value and inc is 0)       
#
#  example :
#  variable(2, 200)      # > this will set the variable 2 to 200
#  variable(2, 0, 7890)  # > previous value of variable 2 + 7890
#  variable(2, 0, -90)    # > previous value of variable 2 - 90
#  variable(2, 0, 0, 10)  # > previous value of variable 2 * 10
#  variable(2, 0, 0, 0.5) # > previous value of variable 2 is halved       
#       
#     
#
# *Control Self Switch :
#  ---------------------------------
#  self_switch(mapid, eventid, selfswitch = "A", value = true)
#  ---------------------------------
#    map_id =
#        0      = current map
#        above 1 = map ID
#
#    eventid =
#        0      = target event
#        above 1 = event ID
#
#    selfswitch  = "A", "B", "C", "D"
#        (empty) = "A"
#
#    value      = true/false
#        (empty) = true
#
#  example :
#  self_switch(0, 0, "A", true)  # > will set the target event self switch A
#                                # to true
#  self_switch(1, 14, "C", false) # > will set event with ID 14 in MAP 1
#                                # self switch C to false     
#       
#     
#
# *Erase event :
#  ---------------------------------
#  erase(event_id)
#  ---------------------------------
#    event_id =
#        (empty) = target event
#        0      = nothing happened
#        above 1 = event ID
#
#  example :
#  erase    # > will erase the target event
#  erase(64) # > will erase the event with ID 64
#     
#     
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

if Object.const_defined?('SDK')
 SDK.log('Advanced Move Route', 'LiTTleDRAgo', 1, '22.02.11')
 @drago_advmoveroute_disabled = true if !SDK.enabled?('Advanced Move Route')
end

if !@drago_advmoveroute_disabled
#===============================================================================
# Game_Character
#===============================================================================
  class Game_Character 
    attr_accessor :zoom_x
    attr_accessor :zoom_y
 
    alias drago_ex_initialize initialize
    def initialize
      drago_ex_initialize
      @zoom_x, @zoom_y  = 1.0, 1.0     
    end
 
    def anime(anime_id)
      self.animation_id = anime_id   
    end
 
    def anime_d(u,d,l,r)
      case @direction
      when 2 then self.animation_id = d   
      when 8 then self.animation_id = u
      when 4 then self.animation_id = l
      when 6 then self.animation_id = r     
      end 
    end   
 
    def zoom(x,y)
      self.zoom_x, self.zoom_y = x / 100, y / 100 if x >= 100 && y >= 100
      self.zoom_x, self.zoom_y = x, y
    end 
 
    def change_move_type(type)
      @move_type = [[type, 0].max, 3].min
    end
 
    def change_hue(hue)
      @character_hue = [[hue, 0].max, 255].min
    end
   
    def variable(var_id, value = 0, inc = 0, multi = 0)
      $game_variables[var_id] = value  if inc == 0 && multi == 0
      $game_variables[var_id] += inc  if inc != 0 && multi == 0
      $game_variables[var_id] *= multi if inc == 0 && multi != 0
      $game_map.need_refresh = true
    end
         
    def self_switch(mapid=$game_map.map_id,eventid=self.id,selfswitch="A",value=true)
      mapid  = $game_map.map_id  if mapid  <= 0
      eventid = self.id          if eventid <= 0
      $game_self_switches[[mapid,eventid,selfswitch]] = value
      $game_map.need_refresh = true
    end
   
    def erase(event = self.id)
      $game_map.events[event].erase if event > 0
      $game_map.need_refresh = true
    end
  end
#===============================================================================
# Sprite_Character
#===============================================================================
  class Sprite_Character < RPG::Sprite
 
    alias drago_charsprite_update update
    def update
      drago_charsprite_update
      @zoom_x, @zoom_y,self.zoom_x,self.zoom_y = @character.zoom_x,
        @character.zoom_y, @character.zoom_x, @character.zoom_y if
        @zoom_x != @character.zoom_x or @zoom_y != @character.zoom_y             
    end 
  end 
end
Sory engrish lagi


Credits


  • LiTTleDRAgo
 

[Xp] Advanced Move Route

Topik sebelumnya Topik selanjutnya Kembali Ke Atas 

Similar topics

+
Halaman 1 dari 1

Permissions in this forum:Anda tidak dapat menjawab topik
RPGMakerID :: Scripts & Event Systems :: RMXP Scripts-