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] 8-Directional Movement

Topik sebelumnya Topik selanjutnya Go down 
[XP] 8-Directional Movement Empty2012-07-10, 22:25
Post[XP] 8-Directional Movement
#1
LowlingLife 
Administrator
Administrator
LowlingLife

Kosong
Posts : 2000
Thanked : 25
Engine : Multi-Engine User
Awards:

[XP] 8-Directional Movement Vide
8-Directional Movement
Versi: 1.0
Tipe: Movement


Pengenalan

Lagi iseng gak ada kerjaan... Jadi males saat nge-script buat projek. Akhirnya jadi.

Script ini memungkinkan player bergerak ke 8 arah. Tambahannya Upper dan Lower Left/Right. Abis itu event juga bisa bergerak ke 8 arah saat pakai fungsi move route Random.


Fitur


  • Player bisa bergerak ke-8 arah.
  • Event bisa bergerak ke-8 arah.



Screenshots

Gak perlu.


Demo

Gak perlu.


Scripts

Version : 1.0
Code:
#==============================================================================
# [RGSS/2] 8-Directional Movement
# Version : 1.1
# Author : LowlingLife
#==============================================================================
# Membuat player dapat berjalan ke 8 arah yaitu secara diagonal. Script ini
# juga membuat event dapat berjalan ke-8 arah jika memakai Set Move Route
# 8.
#==============================================================================
# CHANGELOG :
# V. 1.0 | Original Release
# V. 1.1 | Cross Engine
#==============================================================================
module EightDir
  # Set ke true jika ingin event dapat berjalan ke-8 arah saat Random di Set
  # Move Route.
  ALLOW_EVENT = true
end
#==============================================================================
# EDITING BEYOND THIS LINE CAN CAUSE DAMAGE TO YOUR GAME, THEREFORE EDIT
# WITH YOUR OWN RISK.
#==============================================================================
VX = defined?(Window_ActorCommand)
dir1 = VX ? "move_by_input" : "update"
dir2 = VX ? "life_eight_dir_move" : "life_eight_dir_update"
dir3 = "unless moving? or $game_system.map_interpreter.running? or @move_route_forcing" if !VX
dir4 = "return unless movable?; return if $game_map.interpreter.running?" if VX
dir5 = "end" if !VX
#==============================================================================
# Game_Player
#==============================================================================
eval "
class Game_Player < Game_Character
#-----------------------------------------------------------------------------
# Update / Move by Input
#-----------------------------------------------------------------------------
alias #{dir2} #{dir1}
def #{dir1}
  #{dir2}
  #{dir3}
  #{dir4}
  case Input.dir8
  when 1; move_lower_left
  when 2; move_down
  when 3; move_lower_right
  when 4; move_left
  when 6; move_right
  when 7; move_upper_left
  when 8; move_up
  when 9; move_upper_right
  end
  #{dir5}
end
end#"
#==============================================================================
# Game_Character
#==============================================================================
class Game_Character
  if EightDir::ALLOW_EVENT
  #----------------------------------------------------------------------------
  # Move Random
  #----------------------------------------------------------------------------
  def move_random
    case rand(8)
    when 0; move_down(false)
    when 1; move_left(false)
    when 2; move_right(false)
    when 3; move_up(false)
    when 4; move_upper_left
    when 5; move_upper_right
    when 6; move_lower_left
    when 7; move_lower_right
    end
  end
end
end
http://pastebin.com/7xKThJ2V


Credits


  • LowlingLife - Author


Terakhir diubah oleh LowlingLife tanggal 2014-05-04, 19:07, total 1 kali diubah
[XP] 8-Directional Movement Empty2012-07-10, 22:37
PostRe: [XP] 8-Directional Movement
#2
Nefusa 7 
Senior
Senior
Nefusa 7

Level 5
Posts : 954
Thanked : 6
Engine : RMXP
Skill : Intermediate
Type : Scripter

[XP] 8-Directional Movement Vide
script yang tidak asing :hmm:
tapi..
apa boleh buat :ngacay2:
event bisa side move? :ngacay2:
entah apa itu namanya yang gerak samping :v
nice aja and 1 thumb + mulut kucing buat anda =w=b
:lol: :hammer:
:kabur:
[XP] 8-Directional Movement Empty2012-07-10, 22:56
PostRe: [XP] 8-Directional Movement
#3
LowlingLife 
Administrator
Administrator
LowlingLife

Kosong
Posts : 2000
Thanked : 25
Engine : Multi-Engine User
Awards:

[XP] 8-Directional Movement Vide
Eventnya bisa jadi kayak diagonal movement. Scriptnya emang gak asing kok om. Cukup mudah sebenarnya... Anyway, secara default, kalo diperintahkan di set move route, event bisa kok bergerak secara diagonal. Yang dimaksud di sini tuh eventnya bisa bergerak 8 arah saat Random. Jadi ada sedikit variasi gak gitu-gitu aja...
[XP] 8-Directional Movement Empty2012-07-10, 23:01
PostRe: [XP] 8-Directional Movement
#4
Nefusa 7 
Senior
Senior
Nefusa 7

Level 5
Posts : 954
Thanked : 6
Engine : RMXP
Skill : Intermediate
Type : Scripter

[XP] 8-Directional Movement Vide
LowlingLife wrote:
Eventnya bisa jadi kayak diagonal movement. Scriptnya emang gak asing kok om. Cukup mudah sebenarnya... Anyway, secara default, kalo diperintahkan di set move route, event bisa kok bergerak secara diagonal. Yang dimaksud di sini tuh eventnya bisa bergerak 8 arah saat Random. Jadi ada sedikit variasi gak gitu-gitu aja...
oh.. jadi ketika Autonomous Movement Typenya random, maka dia bisa bergerak diagonal :hmm:
kan biasanya cuman kanan, kiri, atas, bawah :v
variasi =w=b

btw nice =w=b
[XP] 8-Directional Movement Empty2012-07-11, 06:55
PostRe: [XP] 8-Directional Movement
#5
Lukas 
Senior
Senior
avatar

Level 5
Posts : 618
Thanked : 22

[XP] 8-Directional Movement Vide
imo : lebih baik dibuat di sub forum tutorial aja,
karna emang tinggal ganti Input.dir4 jadi Input.dir8 , dan itu di apply di smua engine pun jadi :v
dan di help file pun dah di kasih tau caranya :v
[XP] 8-Directional Movement Empty2012-07-11, 10:12
PostRe: [XP] 8-Directional Movement
#6
LowlingLife 
Administrator
Administrator
LowlingLife

Kosong
Posts : 2000
Thanked : 25
Engine : Multi-Engine User
Awards:

[XP] 8-Directional Movement Vide
:hmm: Kayaknya bukan termasuk tutorial sih om. Soalnya ini bagaimanapun juga tetap dianggap script. Bukannya mau gimana tapi setahu saya ini udah beda om.. No Offense...

Semua engine? Oh.... :v
[XP] 8-Directional Movement Empty
PostRe: [XP] 8-Directional Movement
#7
Sponsored content 




[XP] 8-Directional Movement Vide
 

[XP] 8-Directional Movement

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-