ya deja u un poste sur ca mais jte donne kan meme le script :
ATTENTION ! !! N´installez pas ce script si vous avez ajouter les scripts Train Actor et celui du déplacement dans les 8 directions car ils sont incompatibles!!!
Comme vous le savez, les persos se déplacent comme s´il y avait des cases invisibles sur les maps. Même en faisant une pression net sur la direction, le perso se déplacera toujours case par case.
Alors voici un script de Dubealex qui permet d´avoir un déplacement plus réaliste. Le perso ne se déplacera plus case par case car ses mouvement ont été divisé par 4.
Allez dans l´éditeur de script et créer un nouveau script du nom de ´Game_Player2´ et insérer le code ci-dessous :
Code:
- ##########################################
- Game Player - 4 times smoother walking *#
# #
- Insert a new script into your Script #
- Window and paste this to it, name the new #
- script Game_Player 2 #
# #
- This only effects the Player Character´s #
- movment, not event based movments. #
# #
- ###############################3oops######
class Game_Player < Game_Character
- -------------------------------------------------
-------------------------
- This is what happens when the hero advances up This is also well commented
- the other 3 movments I got lazy... or just plain silly.
- -------------------------------------------------
-------------------------
def move_down(turn_enabled = true)
- turn down... I left turning in the likely case it is needed ( strafing?)
if turn_enabled
turn_down
end
- When movment is possible,
if passable?(@x, @y, 2)
- turn down
turn_down
- Step forward 1/4 of normal steps
@y += 0.25
- increase party steps
increase_steps
- If the tile can´t be walked on
else
- This saves the hero from getting stuck on a no-movment-tile
- It just tosses him to a legal tile when he tries to move
@y = @y.to_i
- Starts a contact event trigger
check_event_trigger_touch(@x, @y+1)
end
end
- -------------------------------------------------
-------------------------
- . ..advance left
- -------------------------------------------------
-------------------------
def move_left(turn_enabled = true)
- turn left
if turn_enabled
turn_left
end
- . .. movment possible?
if passable?(@x, @y, 4)
- turn left
turn_left
- step left
@x -= 0.25
- increase party steps
increase_steps
- movment isn´t allowed so...
else
@x = @x.to_i
- contact trigger
check_event_trigger_touch(@x-1, @y)
end
end
- -------------------------------------------------
-------------------------
- Move right!!!
- -------------------------------------------------
-------------------------
def move_right(turn_enabled = true)
- turn right
if turn_enabled
turn_right
end
- move allowed?
if passable?(@x, @y, 6)
- turn right... duh
turn_right
- step right
@x += 0.25
- Self Explanitory... getting commenting feaver
increase_steps
else
@x = @x.to_i
- contact trigger
check_event_trigger_touch(@x+1, @y)
end
end
- -------------------------------------------------
-------------------------
- Moo-ooovin on up!!! To the east side...
- -------------------------------------------------
-------------------------
def move_up(turn_enabled = true)
- move up... east side
if turn_enabled
turn_up
end
#
if passable?(@x, @y, 8)
- move up... I hope the candid comments don´t confuse you...
turn_up
- step up
@y -= 0.25
- S.E.
increase_steps
else
@y = @y.to_i
- contact trigger
check_event_trigger_touch(@x, @y-1)
end
end
end