1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
| #############################################
#* 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 |