RPGMakerID
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Komunitas RPG Maker Indonesia
 
IndeksIndeks  Latest imagesLatest images  PencarianPencarian  PendaftaranPendaftaran  Login  
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.

 

 [XP] 8-Directional Movement

Go down 
3 posters
PengirimMessage
LowlingLife
Administrator
Administrator
LowlingLife


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

Trophies
Awards:

[XP] 8-Directional Movement Empty
PostSubyek: [XP] 8-Directional Movement   [XP] 8-Directional Movement Empty2012-07-10, 22:25

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
Kembali Ke Atas Go down
Nefusa 7
Senior
Senior
Nefusa 7


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

[XP] 8-Directional Movement Empty
PostSubyek: Re: [XP] 8-Directional Movement   [XP] 8-Directional Movement Empty2012-07-10, 22:37

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:
Kembali Ke Atas Go down
https://nefusa.my.id/
LowlingLife
Administrator
Administrator
LowlingLife


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

Trophies
Awards:

[XP] 8-Directional Movement Empty
PostSubyek: Re: [XP] 8-Directional Movement   [XP] 8-Directional Movement Empty2012-07-10, 22:56

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...
Kembali Ke Atas Go down
Nefusa 7
Senior
Senior
Nefusa 7


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

[XP] 8-Directional Movement Empty
PostSubyek: Re: [XP] 8-Directional Movement   [XP] 8-Directional Movement Empty2012-07-10, 23:01

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
Kembali Ke Atas Go down
https://nefusa.my.id/
Lukas
Senior
Senior
avatar


Level 5
Posts : 618
Thanked : 22

[XP] 8-Directional Movement Empty
PostSubyek: Re: [XP] 8-Directional Movement   [XP] 8-Directional Movement Empty2012-07-11, 06:55

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
Kembali Ke Atas Go down
LowlingLife
Administrator
Administrator
LowlingLife


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

Trophies
Awards:

[XP] 8-Directional Movement Empty
PostSubyek: Re: [XP] 8-Directional Movement   [XP] 8-Directional Movement Empty2012-07-11, 10:12

: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
Kembali Ke Atas Go down
Sponsored content





[XP] 8-Directional Movement Empty
PostSubyek: Re: [XP] 8-Directional Movement   [XP] 8-Directional Movement Empty

Kembali Ke Atas Go down
 
[XP] 8-Directional Movement
Kembali Ke Atas 
Halaman 1 dari 1
 Similar topics
-
» [Xp][Vx] Stop All Movement
» Tentang Movement
» [Ask] window movement?
» event movement di cutscene
» [solved][Req] movement without up,down,left,right

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