Oniromancie: Scripts - First Person RPG


Comment ça marche?

Aëdemphia
Par Sylvanor

Fighting Robots Quest
Par Boulon

Forstale
Par Ødd Clock

Geex
Par roys

Inexistence
Par Falco

La Légende d'Ibabou
Par Zaitan

Lije
Par Gaetz

LoveMaster
Par Cuddlefox

Sarcia
Par Kaëlar

Super Mario RPG - Lost Souls
Par Omegabowser

Jeux: Monster World RPG / Jeux: Pif et Hercule / News: Mise à jour de RPG Maker 2003 / Tutos: Création de charset / Jeux: FAYLINAWA /

Chat  (57 connectés)

Bienvenue
visiteur !






publicité RPG Maker!

Statistiques

Liste des
membres


Contact

78 connectés actuellement

9254055 visiteurs
depuis l'ouverture

1338 visiteurs
aujourd'hui

Groupe Facebook

Barre de séparation

Partenaires




TOP
GAMEMAKING


Les 5 plus
visités

Lunae, le baz'arts d'Emz0

Le studio du chat vert

Pixelandgame

Tashiroworld

HeyMakeGames

Au hasard

RPG Land

Le Blog d'Exaheva

Off Game

Les deux derniers

Lunae, le baz'arts d'Emz0

Le studio du chat vert

Nos autres partenaires

Devenir
partenaire


Barre de séparation

Un site du réseau
War Paradise

Annuaires référenceurs




First Person RPG
Script pour RPG Maker XP
Ecrit par julienhora

Voilà, placer un script au dessus de main et nommé le

^^First Person RPG^^

# ----------------------------------------------------------------
# Script Name: First Person RPG
# Created by: BigKevSexyMan
# Finished by: 7/28/06
# Adapted by: David Ceel
# ----------------------------------------------------------------

class First_Person

attr_accessor :transition
# Picture Positions
# 12 13 14 15 16 17 18
# 7 8 9 10 11
# 4 5 6
# 1 2 3
# P
# These are the number and rough placement of the images that will be used.
# There are a total of eighteen. This is the placement of the images from the forwards perspective.
def designer_modifications
# This method is meant to establish what bitmaps will be used for all the images.
# This method should be the ONLY thing you should modify.
# First we cycle through all the images
for i in 1...55

case $game_map.tileset_name # Next, we check to see what tileset is being used.
when "FPRPG_Forest"
@background.bitmap = RPG::Cache.picture("back")
@transition = "back"
case $game_map.terrain_tag(@positionX, @positionY)
when 1 # Terrain Tag 1
@image.bitmap = RPG::Cache.picture("Pierre")
@graphic = "Pierre"

when 2 # Terrain Tag 2
@image.bitmap = RPG::Cache.picture("herbe")
@graphic = "herbe"

when 3 # Terrain Tag 3
@image.bitmap = RPG::Cache.picture("arbre")
@graphic = "arbre"

when 4 # Terrain Tag 4
@image.bitmap = RPG::Cache.picture("caillou")
@graphic = "caillou"

when 5 # Terrain Tag 5
@image.bitmap = RPG::Cache.picture("maison")
@graphic = "maison"

when 6 # Terrain Tag 6
@image.bitmap = RPG::Cache.picture("montagne")
@graphic = "montagne"

else
@image.bitmap = nil
@graphic = nil
end

end
# Now we determine if there are any events that you want to show up.
for k in 1...$game_map.events.size+1
if $game_map.events[k] != nil
# Checking to see if those events are in any of the designated slots
if $game_map.events[k].event.x == @positionX
if $game_map.events[k].event.y == @positionY
# Checking the name of each event. These can be reused from map to map,
# but be sure not to put two "Treasure1"s on the same map or bugs will occur.
case $game_map.events[k].event.name
# Switch based events are kinda tricky to do.
# Just remember that we cannot see the actual map.
# Simply have the event facing down for the normal, and
# change the events direction when something has happened.
# 2 = down, 4 = left, 6 = right, 8 = up
# Keep in mind that you must use the $fprpg.refesh line using the call script
# command every time you change an events graphic
when "panneau"
if $game_player.direction == 8
@image.bitmap = RPG::Cache.picture("panneau3")
@graphic = "panneau3"
elsif $game_player.direction == 2
@image.bitmap = RPG::Cache.picture("panneau4")
@graphic = "panneau4"
elsif $game_player.direction == 4
@image.bitmap = RPG::Cache.picture("panneau2")
@graphic = "panneau2"
elsif $game_player.direction == 6
@image.bitmap = RPG::Cache.picture("panneau")
@graphic = "panneau"
end

when "homme"
@image.bitmap = RPG::Cache.picture("homme")
@graphic = "homme"

when "suicide"
@image.bitmap = RPG::Cache.picture("suicide")
@graphic = @suicide
@image.bitmap = RPG::Cache.picture("suicide")
@graphic = @suicide
when "mort"
@image.bitmap = RPG::Cache.picture("mort")
@graphic = "mort"
end
end
end
end
end
end
end
def initialize # Declaring all the images being used.
@background = Sprite.new
@background.z = 50
@graphic = []
@image = []
for i in 1...55
@image = Sprite.new
end
refresh
end


def side_images(direction)
# 1-18 Front Facing
# 19-36 Left Side
# 37-54 Right Side
case direction
when "up"
# Left Side
@positionY[37] = $game_player.y - 1
@positionY[38] = $game_player.y
@positionY[39] = $game_player.y + 1
@positionY[40] = $game_player.y - 1
@positionY[41] = $game_player.y
@positionY[42] = $game_player.y + 1
@positionY[43] = $game_player.y - 2
@positionY[44] = $game_player.y - 1
@positionY[45] = $game_player.y
@positionY[46] = $game_player.y + 1
@positionY[47] = $game_player.y + 2
@positionY[48] = $game_player.y - 3
@positionY[49] = $game_player.y - 2
@positionY[50] = $game_player.y - 1
@positionY[51] = $game_player.y
@positionY[52] = $game_player.y + 1
@positionY[53] = $game_player.y + 2
@positionY[54] = $game_player.y + 3
@q = 1
for i in 37...55
@positionX = $game_player.x + @q
if i == 39 or i == 42 or i == 47
@q += 1
end
end

# Right Side
@positionY[19] = $game_player.y + 1
@positionY[20] = $game_player.y
@positionY[21] = $game_player.y - 1
@positionY[22] = $game_player.y + 1
@positionY[23] = $game_player.y
@positionY[24] = $game_player.y - 1
@positionY[25] = $game_player.y + 2
@positionY[26] = $game_player.y + 1
@positionY[27] = $game_player.y
@positionY[28] = $game_player.y - 1
@positionY[29] = $game_player.y - 2
@positionY[30] = $game_player.y + 3
@positionY[31] = $game_player.y + 2
@positionY[32] = $game_player.y + 1
@positionY[33] = $game_player.y
@positionY[34] = $game_player.y - 1
@positionY[35] = $game_player.y - 2
@positionY[36] = $game_player.y - 3
@q = 1
for i in 19...37
@positionX = $game_player.x - @q
if i == 21 or i == 24 or i == 29
@q += 1
end
end

when "down"
# Left Side
@positionY[19] = $game_player.y - 1
@positionY[20] = $game_player.y
@positionY[21] = $game_player.y + 1
@positionY[22] = $game_player.y - 1
@positionY[23] = $game_player.y
@positionY[24] = $game_player.y + 1
@positionY[25] = $game_player.y - 2
@positionY[26] = $game_player.y - 1
@positionY[27] = $game_player.y
@positionY[28] = $game_player.y + 1
@positionY[29] = $game_player.y + 2
@positionY[30] = $game_player.y - 3
@positionY[31] = $game_player.y - 2
@positionY[32] = $game_player.y - 1
@positionY[33] = $game_player.y
@positionY[34] = $game_player.y + 1
@positionY[35] = $game_player.y + 2
@positionY[36] = $game_player.y + 3
@q = 1
for i in 19...37
@positionX = $game_player.x + @q
if i == 21 or i == 24 or i == 29
@q += 1
end
end

# Right Side
@positionY[37] = $game_player.y + 1
@positionY[38] = $game_player.y
@positionY[39] = $game_player.y - 1
@positionY[40] = $game_player.y + 1
@positionY[41] = $game_player.y
@positionY[42] = $game_player.y - 1
@positionY[43] = $game_player.y + 2
@positionY[44] = $game_player.y + 1
@positionY[45] = $game_player.y
@positionY[46] = $game_player.y - 1
@positionY[47] = $game_player.y - 2
@positionY[48] = $game_player.y + 3
@positionY[49] = $game_player.y + 2
@positionY[50] = $game_player.y + 1
@positionY[51] = $game_player.y
@positionY[52] = $game_player.y - 1
@positionY[53] = $game_player.y - 2
@positionY[54] = $game_player.y - 3
@q = 1
for i in 37...55
@positionX = $game_player.x - @q
if i == 39 or i == 42 or i == 47
@q += 1
end
end
when "left"
# Left Side
@positionX[19] = $game_player.x + 1
@positionX[20] = $game_player.x
@positionX[21] = $game_player.x - 1
@positionX[22] = $game_player.x + 1
@positionX[23] = $game_player.x
@positionX[24] = $game_player.x - 1
@positionX[25] = $game_player.x + 2
@positionX[26] = $game_player.x + 1
@positionX[27] = $game_player.x
@positionX[28] = $game_player.x - 1
@positionX[29] = $game_player.x - 2
@positionX[30] = $game_player.x + 3
@positionX[31] = $game_player.x + 2
@positionX[32] = $game_player.x + 1
@positionX[33] = $game_player.x
@positionX[34] = $game_player.x - 1
@positionX[35] = $game_player.x - 2
@positionX[36] = $game_player.x - 3
@q = 1
for i in 19...37
@positionY = $game_player.y + @q
if i == 21 or i == 24 or i == 29
@q += 1
end
end

# Right Side
@positionX[37] = $game_player.x - 1
@positionX[38] = $game_player.x
@positionX[39] = $game_player.x + 1
@positionX[40] = $game_player.x - 1
@positionX[41] = $game_player.x
@positionX[42] = $game_player.x + 1
@positionX[43] = $game_player.x - 2
@positionX[44] = $game_player.x - 1
@positionX[45] = $game_player.x
@positionX[46] = $game_player.x + 1
@positionX[47] = $game_player.x + 2
@positionX[48] = $game_player.x - 3
@positionX[49] = $game_player.x - 2
@positionX[50] = $game_player.x - 1
@positionX[51] = $game_player.x
@positionX[52] = $game_player.x + 1
@positionX[53] = $game_player.x + 2
@positionX[54] = $game_player.x + 3
@q = 1
for i in 37...55
@positionY = $game_player.y - @q
if i == 39 or i == 42 or i == 47
@q += 1
end
end

when "right"
# Left Side
@positionX[19] = $game_player.x - 1
@positionX[20] = $game_player.x
@positionX[21] = $game_player.x + 1
@positionX[22] = $game_player.x - 1
@positionX[23] = $game_player.x
@positionX[24] = $game_player.x + 1
@positionX[25] = $game_player.x - 2
@positionX[26] = $game_player.x - 1
@positionX[27] = $game_player.x
@positionX[28] = $game_player.x + 1
@positionX[29] = $game_player.x + 2
@positionX[30] = $game_player.x - 3
@positionX[31] = $game_player.x - 2
@positionX[32] = $game_player.x - 1
@positionX[33] = $game_player.x
@positionX[34] = $game_player.x + 1
@positionX[35] = $game_player.x + 2
@positionX[36] = $game_player.x + 3
@q = 1
for i in 19...37
@positionY = $game_player.y - @q
if i == 21 or i == 24 or i == 29
@q += 1
end
end

# Right Side
@positionX[37] = $game_player.x + 1
@positionX[38] = $game_player.x
@positionX[39] = $game_player.x - 1
@positionX[40] = $game_player.x + 1
@positionX[41] = $game_player.x
@positionX[42] = $game_player.x - 1
@positionX[43] = $game_player.x + 2
@positionX[44] = $game_player.x + 1
@positionX[45] = $game_player.x
@positionX[46] = $game_player.x - 1
@positionX[47] = $game_player.x - 2
@positionX[48] = $game_player.x + 3
@positionX[49] = $game_player.x + 2
@positionX[50] = $game_player.x + 1
@positionX[51] = $game_player.x
@positionX[52] = $game_player.x - 1
@positionX[53] = $game_player.x - 2
@positionX[54] = $game_player.x - 3
@q = 1
for i in 37...55
@positionY = $game_player.y + @q
if i == 39 or i == 42 or i == 47
@q += 1
end
end
end
end



# The refresh method is used when the update method is finished and when the script first starts.
# The refresh method basically checks and rechecks to make sure that the right slots are filled
# in with the right images.
def refresh
# First, we must see where the character is facing.
case $game_player.direction
when 2 #down
# After that is done we find the x and y coor. of all the slots being used relevant to the
# player's position and direction.
@positionX = []
@positionX[1] = $game_player.x + 1
@positionX[2] = $game_player.x
@positionX[3] = $game_player.x - 1
@positionX[4] = $game_player.x + 1
@positionX[5] = $game_player.x
@positionX[6] = $game_player.x - 1
@positionX[7] = $game_player.x + 2
@positionX[8] = $game_player.x + 1
@positionX[9] = $game_player.x
@positionX[10] = $game_player.x - 1
@positionX[11] = $game_player.x - 2
@positionX[12] = $game_player.x + 3
@positionX[13] = $game_player.x + 2
@positionX[14] = $game_player.x + 1
@positionX[15] = $game_player.x
@positionX[16] = $game_player.x - 1
@positionX[17] = $game_player.x - 2
@positionX[18] = $game_player.x - 3
@positionY = []
@q = 1
for i in 1...19
@positionY = $game_player.y + @q
if i == 3 or i == 6 or i == 11
@q += 1
end
end
side_images("down")


when 4 #left
@positionY = []
@positionY[1] = $game_player.y + 1
@positionY[2] = $game_player.y
@positionY[3] = $game_player.y - 1
@positionY[4] = $game_player.y + 1
@positionY[5] = $game_player.y
@positionY[6] = $game_player.y - 1
@positionY[7] = $game_player.y + 2
@positionY[8] = $game_player.y + 1
@positionY[9] = $game_player.y
@positionY[10] = $game_player.y - 1
@positionY[11] = $game_player.y - 2
@positionY[12] = $game_player.y + 3
@positionY[13] = $game_player.y + 2
@positionY[14] = $game_player.y + 1
@positionY[15] = $game_player.y
@positionY[16] = $game_player.y - 1
@positionY[17] = $game_player.y - 2
@positionY[18] = $game_player.y - 3
@positionX = []
@q = 1
for i in 1...19
@positionX = $game_player.x - @q
if i == 3 or i == 6 or i == 11
@q += 1
end
end
side_images("left")

when 6 #right
@positionY = []
@positionY[1] = $game_player.y - 1
@positionY[2] = $game_player.y
@positionY[3] = $game_player.y + 1
@positionY[4] = $game_player.y - 1
@positionY[5] = $game_player.y
@positionY[6] = $game_player.y + 1
@positionY[7] = $game_player.y - 2
@positionY[8] = $game_player.y - 1
@positionY[9] = $game_player.y
@positionY[10] = $game_player.y + 1
@positionY[11] = $game_player.y + 2
@positionY[12] = $game_player.y - 3
@positionY[13] = $game_player.y - 2
@positionY[14] = $game_player.y - 1
@positionY[15] = $game_player.y
@positionY[16] = $game_player.y + 1
@positionY[17] = $game_player.y + 2
@positionY[18] = $game_player.y + 3
@positionX = []
@q = 1
for i in 1...19
@positionX = $game_player.x + @q
if i == 3 or i == 6 or i == 11
@q += 1
end
end
side_images("right")

when 8 #up
@positionX = []
@positionX[1] = $game_player.x - 1
@positionX[2] = $game_player.x
@positionX[3] = $game_player.x + 1
@positionX[4] = $game_player.x - 1
@positionX[5] = $game_player.x
@positionX[6] = $game_player.x + 1
@positionX[7] = $game_player.x - 2
@positionX[8] = $game_player.x - 1
@positionX[9] = $game_player.x
@positionX[10] = $game_player.x + 1
@positionX[11] = $game_player.x + 2
@positionX[12] = $game_player.x - 3
@positionX[13] = $game_player.x - 2
@positionX[14] = $game_player.x - 1
@positionX[15] = $game_player.x
@positionX[16] = $game_player.x + 1
@positionX[17] = $game_player.x + 2
@positionX[18] = $game_player.x + 3
@positionY = []
@q = 1
for i in 1...19
@positionY = $game_player.y - @q
if i == 3 or i == 6 or i == 11
@q += 1
end
end
side_images("up")
end

designer_modifications # Calling the method that the game designer modifies.

# This is the last piece of the refresh method.
# Here is where we make sure every image has the right x and y coor.,
# and the right zoom

@q = -160
for i in 1...4
@image.x = @q
@image.y = 0
@image.z = 54
@image.zoom_x = 1
@image.zoom_y = 1
@image[i+18].x = @q - 960
@image[i+18].y = 0
@image[i+18].z = 54
@image[i+18].zoom_x = 1
@image[i+18].zoom_y = 1
@image[i+36].x = @q + 960
@image[i+36].y = 0
@image[i+36].z = 54
@image[i+36].zoom_x = 1
@image[i+36].zoom_y = 1
@q += 320
end

@q = -40
for i in 4...7
@image.x = @q
@image.y = 20
@image.z = 53
@image.zoom_x = 0.75
@image.zoom_y = 0.75
@image[i+18].x = @q - 720
@image[i+18].y = 20
@image[i+18].z = 53
@image[i+18].zoom_x = 0.75
@image[i+18].zoom_y = 0.75
@image[i+36].x = @q + 720
@image[i+36].y = 20
@image[i+36].z = 53
@image[i+36].zoom_x = 0.75
@image[i+36].zoom_y = 0.75
@q += 240
end

@q = -80
for i in 7...12
@image.x = @q
@image.y = 40
@image.z = 52
@image.zoom_x = 0.5
@image.zoom_y = 0.5
@image[i+18].x = @q - 800
@image[i+18].y = 40
@image[i+18].z = 52
@image[i+18].zoom_x = 0.5
@image[i+18].zoom_y = 0.5
@image[i+36].x = @q + 800
@image[i+36].y = 40
@image[i+36].z = 52
@image[i+36].zoom_x = 0.5
@image[i+36].zoom_y = 0.5
@q += 160
end

@q = 40
for i in 12...19
@image.x = @q
@image.y = 60
@image.z = 51
@image.zoom_x = 0.25
@image.zoom_y = 0.25
@image[i+18].x = @q - 640
@image[i+18].y = 60
@image[i+18].z = 51
@image[i+18].zoom_x = 0.25
@image[i+18].zoom_y = 0.25
@image[i+36].x = @q + 640
@image[i+36].y = 60
@image[i+36].z = 51
@image[i+36].zoom_x = 0.25
@image[i+36].zoom_y = 0.25
@q += 80
end
end


def update(type = "") # The update method is used when it's time to move those images around.
# This is the moment where we move all the images using my Free Picture Movement Script,
# but first we have to establish where the player is facing.
case type # type is a string describing the type of movement the player is doing.
when "forward"
# All the images under the "forward" case will move towards you, or seem like it.
# This is done by moving the pictures x, y, zoom_x, and zoom_y using the FPM script.
@q = -160
@r = -360
for i in 1...4
if @graphic != nil
$fpm.movement_x(@image, @graphic, i, @q, @r, 12)
$fpm.movement_y(@image, @graphic, i, 0, -20, 12)
$fpm.movement_zoom_x(@image, @graphic, i, 1, 1.25, 12)
$fpm.movement_zoom_y(@image, @graphic, i, 1, 1.25, 12)
end
@q += 320
@r += 480
end

@q = -40
@r = -160
for i in 4...7
if @graphic != nil
$fpm.movement_x(@image, @graphic, i, @q, @r, 12)
$fpm.movement_y(@image, @graphic, i, 20, 0, 12)
$fpm.movement_zoom_x(@image, @graphic, i, 0.75, 1, 12)
$fpm.movement_zoom_y(@image, @graphic, i, 0.75, 1, 12)
end
@q += 240
@r += 320
end

@q = -80
@r = -280
for i in 7...12
if @graphic != nil
$fpm.movement_x(@image, @graphic, i, @q, @r, 12)
$fpm.movement_y(@image, @graphic, i, 40, 20, 12)
$fpm.movement_zoom_x(@image, @graphic, i, 0.5, 0.75, 12)
$fpm.movement_zoom_y(@image, @graphic, i, 0.5, 0.75, 12)
end
@q += 160
@r += 240
end

@q = 40
@r = -240
for i in 12...19
if @graphic != nil
$fpm.movement_x(@image, @graphic, i, @q, @r, 12)
$fpm.movement_y(@image, @graphic, i, 60, 40, 12)
$fpm.movement_zoom_x(@image, @graphic, i, 0.25, 0.5, 12)
$fpm.movement_zoom_y(@image, @graphic, i, 0.25, 0.5, 12)
end
@q += 80
@r += 160
end

when "back"
# All the images under the "back" case will move away from you, or seem like it.
@q = -160
@r = -40
for i in 1...4
if @graphic != nil
$fpm.movement_x(@image, @graphic, i, @q, @r, 12)
$fpm.movement_y(@image, @graphic, i, 0, 20, 12)
$fpm.movement_zoom_x(@image, @graphic, i, 1, 0.75, 12)
$fpm.movement_zoom_y(@image, @graphic, i, 1, 0.75, 12)
end
@q += 320
@r += 240
end

@q = -40
@r = 80
for i in 4...7
if @graphic != nil
$fpm.movement_x(@image, @graphic, i, @q, @r, 12)
$fpm.movement_y(@image, @graphic, i, 20, 40, 12)
$fpm.movement_zoom_x(@image, @graphic, i, 0.75, 0.5, 12)
$fpm.movement_zoom_y(@image, @graphic, i, 0.75, 0.5, 12)
end
@q += 240
@r += 160
end

@q = -80
@r = 120
for i in 7...12
if @graphic != nil
$fpm.movement_x(@image, @graphic, i, @q, @r, 12)
$fpm.movement_y(@image, @graphic, i, 40, 60, 12)
$fpm.movement_zoom_x(@image, @graphic, i, 0.5, 0.25, 12)
$fpm.movement_zoom_y(@image, @graphic, i, 0.5, 0.25, 12)
end
@q += 160
@r += 80
end

@q = 40
@r = 208
for i in 12...19
if @graphic != nil
$fpm.movement_x(@image, @graphic, i, @q, @r, 12)
$fpm.movement_y(@image, @graphic, i, 60, 70, 12)
$fpm.movement_zoom_x(@image, @graphic, i, 0.25, 0.1, 12)
$fpm.movement_zoom_y(@image, @graphic, i, 0.25, 0.1, 12)
end
@q += 80
@r += 32
end

when "left"
$fpm.movement_x(@background, @transition, 0, -640, 0, 12)
# All the images under the "left" case will simply move to the right,
# since you will be turning left.

@q = -160
for i in 1...4
if @graphic != nil
$fpm.movement_x(@image, @graphic, i, @q, @q+960, 12)
end
if @graphic[i+18] != nil
$fpm.movement_x(@image[i+18], @graphic[i+18], i+18, @q-960, @q, 12)
end
@q += 320
end

@q = -40
for i in 4...7
if @graphic != nil
$fpm.movement_x(@image, @graphic, i, @q, @q+720, 12)
end
if @graphic[i+18] != nil
$fpm.movement_x(@image[i+18], @graphic[i+18], i+18, @q-720, @q, 12)
end
@q += 240
end

@q = -80
for i in 7...12
if @graphic != nil
$fpm.movement_x(@image, @graphic, i, @q, @q+800, 12)
end
if @graphic[i+18] != nil
$fpm.movement_x(@image[i+18], @graphic[i+18], i+18, @q-800, @q, 12)
end
@q += 160
end

@q = 40
for i in 12...19
if @graphic != nil
$fpm.movement_x(@image, @graphic, i, @q, @q+640, 12)
end
if @graphic[i+18] != nil
$fpm.movement_x(@image[i+18], @graphic[i+18], i+18, @q-640, @q, 12)
end
@q += 80
end


when "right"
# All the images under the "right" case will simply move to the left,
# since you will be turning right.
$fpm.movement_x(@background, @transition, 0, 0, -640, 12)

@q = -160
for i in 1...4
if @graphic != nil
$fpm.movement_x(@image, @graphic, i, @q, @q-960, 12)
end
if @graphic[i+36] != nil
$fpm.movement_x(@image[i+36], @graphic[i+36], i+36, @q+960, @q, 12)
end
@q += 320
end

@q = -40
for i in 4...7
if @graphic != nil
$fpm.movement_x(@image, @graphic, i, @q, @q-720, 12)
end
if @graphic[i+36] != nil
$fpm.movement_x(@image[i+36], @graphic[i+36], i+36, @q+720, @q, 12)
end
@q += 240
end

@q = -80
for i in 7...12
if @graphic != nil
$fpm.movement_x(@image, @graphic, i, @q, @q-800, 12)
end
if @graphic[i+36] != nil
$fpm.movement_x(@image[i+36], @graphic[i+36], i+36, @q+800, @q, 12)
end
@q += 160
end

@q = 40
for i in 12...19
if @graphic != nil
$fpm.movement_x(@image, @graphic, i, @q, @q-640, 12)
end
if @graphic[i+36] != nil
$fpm.movement_x(@image[i+36], @graphic[i+36], i+36, @q+640, @q, 12)
end
@q += 80
end
end
# For further expainations on how the $fpm methods work, consult the
# Free Picture movement script.
end

def dispose
for i in 1...55
@image.dispose
end
end
end

class Game_Player < Game_Character
alias bksm_fprpg_gameplayer_update update

def update
if $FPRPG_Active == true
# The @moving variable is just there to act as sort of a grace period,
# so you don't turn to fast, or move before the transition is done.
if @moving != nil and @moving >= 13
# When @moving reaches 8 it triggers the refresh method and resets itself back to nil
@moving = nil
$fprpg.refresh
end
if @moving != nil and @moving >= 1
@moving += 1
end

if @moving == nil
unless moving? or $game_system.map_interpreter.running? or
@move_route_forcing or $game_temp.message_window_showing
case Input.dir4
when 2
# move_backwards isn't part of the original coding for RMXP.
# the original is move_backward. I did this so I wouldn't mess up
# any call methods used by RMXP
move_backwards
@moving = 1
when 4
turn_left_90
@moving = 1
$fprpg.update("left") # "left" refers to the type string mentioned earlier
when 6
turn_right_90
@moving = 1
$fprpg.update("right") # So does "right"
when 8
# The same that was said about move_backwards can be said about move_forwards
move_forwards
@moving = 1
end
end
end
last_real_x = @real_x
last_real_y = @real_y
super
if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y
$game_map.scroll_down(@real_y - last_real_y)
end
if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X
$game_map.scroll_left(last_real_x - @real_x)
end
if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X
$game_map.scroll_right(@real_x - last_real_x)
end
if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y
$game_map.scroll_up(last_real_y - @real_y)
end
unless moving?
if @moving == 13
result = check_event_trigger_here([1,2])
if result == false
unless $DEBUG and Input.press?(Input::CTRL)
if @encounter_count > 0
@encounter_count -= 1
end
end
end
end
if Input.trigger?(Input::C)
check_event_trigger_here([0])
check_event_trigger_there([0,1,2])
end
end
else
bksm_fprpg_gameplayer_update
end
end
end

class Game_Character
alias bksm_fprpg_movedown move_down
alias bksm_fprpg_moveup move_up
alias bksm_fprpg_moveleft move_left
alias bksm_fprpg_moveright move_right
def move_forwards
case @direction
when 2
move_down(false, "forward")
when 4
move_left(false, "forward")
when 6
move_right(false, "forward")
when 8
move_up(false, "forward")
end
end

def move_backwards
last_direction_fix = @direction_fix
@direction_fix = true
case @direction
when 2
move_up(false, "back")
when 4
move_right(false, "back")
when 6
move_left(false, "back")
when 8
move_down(false, "back")
end
@direction_fix = last_direction_fix
end

# The below methods are modified so that the eighteen images will
# only update and move if you can move in the forward direction.
def move_down(turn_enabled = true, type = "")
if $FPRPG_Active == true
if turn_enabled
turn_down
end
if passable?(@x, @y, 2)
$fprpg.update(type)
turn_down
@y += 1
increase_steps
else
check_event_trigger_touch(@x, @y+1)
end
else
bksm_fprpg_movedown
end
end

def move_left(turn_enabled = true, type = "")
if $FPRPG_Active == true
if turn_enabled
turn_left
end
if passable?(@x, @y, 4)
$fprpg.update(type)
turn_left
@x -= 1
increase_steps
else
check_event_trigger_touch(@x-1, @y)
end
else
bksm_fprpg_moveleft
end
end

def move_right(turn_enabled = true, type = "")
if $FPRPG_Active == true
if turn_enabled
turn_right
end
if passable?(@x, @y, 6)
$fprpg.update(type)
turn_right
@x += 1
increase_steps
else
check_event_trigger_touch(@x+1, @y)
end
else
bksm_fprpg_moveright
end
end

def move_up(turn_enabled = true, type = "")
if $FPRPG_Active == true
if turn_enabled
turn_up
end
if passable?(@x, @y, 8)
$fprpg.update(type)
turn_up
@y -= 1
increase_steps
else
check_event_trigger_touch(@x, @y-1)
end
else
bksm_fprpg_moveup
end
end
end

class Scene_Map
alias bksm_fprpg_main main
alias bksm_fprpg_update update
alias bksm_fprpg_transfer transfer_player
def main
bksm_fprpg_main
if $FPRPG_Active == true
if $fprpg != nil
$fprpg.dispose
end
$fprpg = First_Person.new
end
end

def update
if $FPRPG_Active == true
if @transition_counter != nil
@transition_counter += 1
if @transition_counter == 8
$fpm.movement_opacity(@transition, $fprpg.transition, 19, 255, 0, 8)
@transition_counter == nil
end
end
end
bksm_fprpg_update
end

def transfer_player
if $FPRPG_Active == true
@transition = Sprite.new
@transition.bitmap = RPG::Cache.picture($fprpg.transition)
@transition.z = 55
@transition.opacity = 0
@transition.tone = Tone.new(-255,-255, -255, 0)
$fpm.movement_opacity(@transition, $fprpg.transition, 19, 0, 255, 8)
@transition_counter = 1
end
bksm_fprpg_transfer
end
end

class Game_Event < Game_Character
attr_reader :event
end

class Spriteset_Battle
alias bksm_fprpg_initialize initialize
def initialize
bksm_fprpg_initialize
if $FPRPG_Active == true
@viewport1.z = 60
@battleback_sprite.dispose
@battleback_sprite = Sprite.new
@battleback_sprite.z = 0
end
end
end

class Scene_Save < Scene_File
alias bksm_fprpg_writesavedata write_save_data
def write_save_data(file)
bksm_fprpg_writesavedata(file)
Marshal.dump($FPRPG_Active, file)
end
end

class Scene_Load < Scene_File
alias bksm_fprpg_readsavedata read_save_data
def read_save_data(file)
bksm_fprpg_readsavedata(file)
$FPRPG_Active = Marshal.load(file)
if $FPRPG_Active == true
$fprpg = First_Person.new
end
end
end



Maintenant que vous avez fait ca, placer un 2eme scripts au dessus de main et nommé le

^^FreePictureMovement^^

# ----------------------------------------------------------------
# Script Name: Free Picture Movement v1.1
# Created by: BigKevSexyMan
# Finished by: 12/18/05
# Updated on: 12/19/05
# ----------------------------------------------------------------
class Free_Picture_Movement

attr_accessor :rotation
attr_accessor :incrimentX
attr_accessor :incrimentY
attr_accessor :incrimentZ
attr_accessor :incrimentAngle
attr_accessor :incrimentZoomX
attr_accessor :incrimentZoomY
attr_accessor :incrimentOpacity
attr_accessor :incrimentCircle
attr_accessor :OpacityRound
attr_accessor :XRound
attr_accessor :YRound
attr_accessor :ZRound
attr_accessor :move_x
attr_accessor :move_y
attr_accessor :move_z
attr_accessor :move_angle
attr_accessor :move_zoomx
attr_accessor :move_zoomy
attr_accessor :move_opacity
attr_accessor :move_circle
attr_accessor :PicName
attr_accessor EdentéramesX
attr_accessor EdentéramesY
attr_accessor EdentéramesZ
attr_accessor EdentéramesAngle
attr_accessor EdentéramesZoomX
attr_accessor EdentéramesZoomY
attr_accessor EdentéramesOpacity
attr_accessor EdentéramesCircle
attr_accessor :CirclePictureX
attr_accessor :CirclePictureY

def initialize
@rotation = 0.0
@incrimentX = []
@incrimentY = []
@incrimentZ = []
@incrimentAngle = []
@incrimentZoomX = []
@incrimentZoomY = []
@incrimentOpacity = []
@incrimentCircle = []
@OpacityRound = []
@XRound = []
@YRound = []
@ZRound = []
@move_x = []
@move_y = []
@move_z = []
@move_angle = []
@move_zoomx = []
@move_zoomy = []
@move_opacity = []
@move_circle = []
@PicName = []
@FramesX = []
@FramesY = []
@FramesZ = []
@FramesAngle = []
@FramesZoomX = []
@FramesZoomY = []
@FramesOpacity = []
@FramesCircle = []
@CirclePictureX = []
@CirclePictureY = []
end
# Setup to move horizontal
def movement_x(name, bitmap, index, point_ax, point_bx, incriment = 10)
@incrimentX[index] = 0.0
@incrimentX[index] = (point_bx - point_ax)/incriment.to_f
if name == nil
name = Sprite.new
end
name.bitmap = RPG::Cache.picture(bitmap)
@XRound[index] = point_ax
@PicName[index] = name
name.x = point_ax
@FramesX[index] = incriment
@move_x[index] = true
end
# Setup to move vertical
def movement_y(name, bitmap, index, point_ay, point_by, incriment = 10)
@incrimentY[index] = 0.0
@incrimentY[index] = (point_by - point_ay)/incriment.to_f
if name == nil
name = Sprite.new
end
name.bitmap = RPG::Cache.picture(bitmap)
@YRound[index] = point_ay
@PicName[index] = name
name.y = point_ay
@FramesY[index] = incriment
@move_y[index] = true
end

# Setup to move above or below other objects
def movement_z(name, bitmap, index, point_az, point_bz, incriment = 10)
@incrimentZ[index] = 0.0
@incrimentZ[index] = (point_bz - point_az)/incriment.to_f
if name == nil
name = Sprite.new
end
name.bitmap = RPG::Cache.picture(bitmap)
@ZRound[index] = point_az
@PicName[index] = name
name.z = point_az
@FramesZ[index] = incriment
@move_z[index] = true
end

# Setup to rotate angle
def movement_rotation(name, bitmap, index, angle_a, angle_b, incriment = 10)
@incrimentAngle[index] = 0.0
@incrimentAngle[index] = (angle_b - angle_a)/incriment.to_f
if name == nil
name = Sprite.new
end
name.bitmap = RPG::Cache.picture(bitmap)
@PicName[index] = name
name.angle = angle_a
@FramesAngle[index] = incriment
@move_angle[index] = true
end

# Setup to change width
def movement_zoom_x(name, bitmap, index, zoom_ax = 1.0, zoom_bx = 1.0, incriment = 10)
@incrimentZoomX[index] = 0.0
@incrimentZoomX[index] = (zoom_bx - zoom_ax)/incriment.to_f
if name == nil
name = Sprite.new
end
name.bitmap = RPG::Cache.picture(bitmap)
@PicName[index] = name
name.zoom_x = zoom_ax
@FramesZoomX[index] = incriment
@move_zoomx[index] = true
end

# Setup to change height
def movement_zoom_y(name, bitmap, index, zoom_ay = 1.0, zoom_by = 1.0, incriment = 10)
@incrimentZoomY[index] = 0.0
@incrimentZoomY[index] = (zoom_by - zoom_ay)/incriment.to_f
if name == nil
name = Sprite.new
end
name.bitmap = RPG::Cache.picture(bitmap)
@PicName[index] = name
name.zoom_y = zoom_ay
@FramesZoomY[index] = incriment
@move_zoomy[index] = true
end

# Setup to change opacity
def movement_opacity(name, bitmap, index, opacity_a = 255, opacity_b = 255, incriment = 10)
@incrimentOpacity[index] = 0.0
if opacity_a > 255
opaicty_a = 255
end
if opacity_b > 255
opaicty_b = 255
end
if opacity_a < 0
opaicty_a = 0
end
if opacity_b < 0
opaicty_b = 0
end
@incrimentOpacity[index] = (opacity_b - opacity_a)/incriment.to_f
if name == nil
name = Sprite.new
end
name.bitmap = RPG::Cache.picture(bitmap)
@OpacityRound[index] = opacity_a
@PicName[index] = name
name.opacity = opacity_a
@FramesOpacity[index] = incriment
@move_opacity[index] = true
end

# Sets picture's angle to point at (point_bx, point_by)
def angle_to_direction(name, point_ax, point_ay, point_bx, point_by)
@px = point_bx - point_ax
@py = point_by - point_ay

if @px != 0
@slope = @py/@px
@rotation = ((Math.atan(@slope) * 360)/6.28).round
end

if @px > 0
if @py > 0
@rotation -= 90
elsif @py < 0
@rotation += 90
elsif @py == 0
@rotation = 0
end
elsif @px < 0
if @py > 0
@rotation += 180
elsif @py < 0
@rotation += 180
elsif @py == 0
@rotation = 180
end
elsif @px == 0
if @py > 0
@rotation = 270
elsif @py < 0
@rotation = 90
elsif @py == 0
@rotation = 0
end
end
name.x = point_ax
name.y = point_ay
name.angle = @rotation
end

# Set's up picture to go in a circle in "turn's" direction. A negative number makes the picture
# go clockwise. A positive number make it go counter clockwise. To rotate the picture from
# the center use:
# $fpm.movement_circle(name, bitmap, index, x, y, turn, -15 , loops, incriment)
def movement_circle(name, bitmap, index, x, y, turn, radius, loops, incriment = 10)
@incrimentCircle[index] = 0.0
@incrimentCircle[index] = (loops * 360)/incriment.to_f
if name == nil
name = Sprite.new
end
name.bitmap = RPG::Cache.picture(bitmap)
@CirclePictureX[index] = x
@CirclePictureY[index] = y
name.x = @CirclePictureX[index]
name.y = @CirclePictureY[index]
name.ox = 0
name.oy = 0
if turn == 'left'
name.x -= radius * name.zoom_x
name.y += name.bitmap.height * name.zoom_y
name.ox = -1 * radius
name.oy = name.bitmap.height
elsif turn == 'right'
name.x += (name.bitmap.width + radius) * name.zoom_x
name.y += name.bitmap.height * name.zoom_y
name.ox = name.bitmap.width + radius
name.oy = name.bitmap.height
@bksm = Sprite.new
@bksm.x = name.x
@bksm.y = name.y
@bksm.bitmap = RPG::Cache.picture("bksm1")
elsif turn == 'up'
name.x += name.bitmap.width / 2 * name.zoom_x
name.y -= radius * name.zoom_y
name.ox = name.bitmap.width / 2
name.oy = -1 * radius
elsif turn == 'down'
name.x += name.bitmap.width / 2 * name.zoom_x
name.y += (name.bitmap.height + radius) * name.zoom_y
name.ox = name.bitmap.width / 2
name.oy = name.bitmap.height + radius
end
@PicName[index] = name
@FramesCircle[index] = incriment
@move_circle[index] = true
end

end

class Scene_Map
alias moving_pictures update
def update
for i in 0...$fpm.PicName.size
# Moves the coresponding picture horizontally
if $fpm.move_x == true
if $fpm.PicName != nil
if $fpm.FramesX != 0
$fpm.XRound += $fpm.incrimentX.to_f
$fpm.PicName.x = $fpm.XRound.round
$fpm.FramesX -= 1
else
$fpm.move_x = false
$fpm.FramesX = nil
$fpm.incrimentX = nil
end
end
end

# Moves the coresponding picture vertically
if $fpm.move_y == true
if $fpm.PicName != nil
if $fpm.FramesY != 0
$fpm.YRound += $fpm.incrimentY.to_f
$fpm.PicName.y = $fpm.YRound.round
$fpm.FramesY -= 1
else
$fpm.move_y = false
$fpm.FramesY = nil
$fpm.incrimentY = nil
end
end
end

# Moves the coresponding picture above or below other objects
if $fpm.move_z == true
if $fpm.PicName != nil
if $fpm.FramesZ != 0
$fpm.ZRound += $fpm.incrimentZ.to_f
$fpm.PicName.z = $fpm.ZRound.round
$fpm.FramesZ -= 1
else
$fpm.move_z = false
$fpm.FramesZ = nil
$fpm.incrimentZ = nil
end
end
end

# Moves the coresponding picture's angle
if $fpm.move_angle == true
if $fpm.PicName != nil
if $fpm.FramesAngle != 0
$fpm.PicName.angle += $fpm.incrimentAngle
$fpm.FramesAngle -= 1
else
$fpm.move_angle = false
$fpm.FramesAngle = nil
$fpm.incrimentAngle = nil
end
end
end

# Makes the coresponding picture grow in width
if $fpm.move_zoomx == true
if $fpm.PicName != nil
if $fpm.FramesZoomX != 0
$fpm.PicName.zoom_x += $fpm.incrimentZoomX
$fpm.FramesZoomX -= 1
else
$fpm.move_zoomx = false
$fpm.FramesZoomX = nil
$fpm.incrimentZoomX = nil
end
end
end

# Makes the coresponding picture grow in height
if $fpm.move_zoomy == true
if $fpm.PicName != nil
if $fpm.FramesZoomY != 0
$fpm.PicName.zoom_y += $fpm.incrimentZoomY
$fpm.FramesZoomY -= 1
else
$fpm.move_zoomy = false
$fpm.FramesZoomY = nil
$fpm.incrimentZoomY = nil
end
end
end

# Changes the coresponding picture's opacity
if $fpm.move_opacity == true
if $fpm.PicName != nil
if $fpm.FramesOpacity != 0
$fpm.OpacityRound += $fpm.incrimentOpacity.to_f
$fpm.PicName.opacity = $fpm.OpacityRound.round
$fpm.FramesOpacity -= 1
else
$fpm.move_opacity = false
$fpm.FramesOpacity = nil
$fpm.incrimentOpacity = nil
end
end
end

# Moves the picture in the designated circle direction
if $fpm.move_circle == true
if $fpm.PicName != nil
if $fpm.FramesCircle != 0
$fpm.PicName.angle += $fpm.incrimentCircle
$fpm.FramesCircle -= 1
else
$fpm.move_circle = false
$fpm.FramesCircle = nil
$fpm.incrimentCircle = nil
$fpm.PicName.ox = 0
$fpm.PicName.oy = 0
$fpm.PicName.x = $fpm.CirclePictureX
$fpm.PicName.y = $fpm.CirclePictureY
end
end
end
end
moving_pictures
end
end

# Declares class Free_Picture_Movement
class Scene_Title
alias declaring command_new_game
alias declaring2 battle_test
alias declaring_continue command_continue
def command_new_game
$fpm = Free_Picture_Movement.new
declaring
end

def command_continue
$fpm = Free_Picture_Movement.new
declaring_continue
end

def battle_test
$fpm = Free_Picture_Movement.new
declaring2
end
end


VoilàRire grinçant

MAIS N'OUBLIER PAS QUE LE NOM DES SCRIPTS EST TRÈS IMPORTANT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


TracerTong - posté le 25/03/2009 à 10:46:00. (27 messages postés)

[/color] Woooouuuuu ! Mais voila qui est rudemeeeeent interessant ! je l'ai pas encore testé, mais, à la première personne, ça doit être..Laclasse ! Sauf que, a mon avis, faudrait utiliser d'autres chipstets en 3d pour ça ^^:sfrog [color=white][bgcolor=black]


gloubyboulga - posté le 03/05/2009 à 08:51:43. (38 messages postés)

Floubidou

UN SCREEN ?


valentinx69 - posté le 02/10/2009 à 22:59:39. (37 messages postés)

VSARASMCorp will win

Dites, si quelqu'un a les images, merci de poster un lien svp. Merci:D

EDIT: En fait, le lien des images est mort, si quelqu'un les a, merci de me donner un lien en mp svp. Ce script me permettrait de faire de belles choses.:D

When you begin 3D, it's for ever ;)


Sharin - posté le 14/10/2009 à 17:25:08. (16 messages postés)

My name is... DarkLink !!!

Salut je voudrais pas vous embêter mais moi j'y comprend rien : ce script ne fait pas grand chose à part tout faire laguer (sauf si c'est mon ordi qui fait tout laguer dans ce cas là le script ne fait rien du tout :p ) enfin bon en bref :help.

Dans son ombre je vis, tous ces geste sont les miens, je suis aussi fort que lui, je suis... DarkLink !!!


acireld - posté le 01/12/2009 à 20:16:44. (173 messages postés)

Beuh, ton lien est dead -_- Tant qu'a faire commencer le C++ et faire un bon fps, parce qu'avec ceux qui postent des scripts bidonnés..:noel


Jakylla - posté le 07/08/2010 à 17:04:39. (45 messages postés)

Heureux

Je l'ai téléchargé, corrigé... Il marche mais...

A quoi sert-il ? Aucuns changements repérés !

Bienvenues à tous et bonne chance pour vos RPG !

Suite à de nombreux abus, le post en invités a été désactivé. Veuillez vous inscrire si vous souhaitez participer à la conversation.

Haut de page

Merci de ne pas reproduire le contenu de ce site sans autorisation.
Contacter l'équipe

Plan du site:

Activité: Accueil | News | Forum | Flash-news | Chat | Commentaires | Galerie | Screen de la semaine | Sorties | Articles perso | Livre d'or | Recherche
Jeux: Index jeux séparés | Top Classiques | Top Originaux | Les autres | RPG Maker 95 | RPG Maker 2000 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker VX Ace | RPG Maker MV | Autres | Jeux complets | Proposer
Rubriques: Le Wiki | Collection Oniro | Tutoriaux | Scripts | Guides | Gaming-Live | Tests | Making-of | Interviews | Articles perso | OST | L'Annuaire | Divers | Palmarès
Hébergés: Aëdemphia | Fighting Robots Quest | Forstale | Geex | Inexistence | La Légende d'Ibabou | Lije | LoveMaster | Sarcia | Super Mario RPG - Lost Souls
Ressources: Jeux | Programmes | Packs de ressources | Midis | Eléments séparés | Sprites
RPG Maker 2000/2003: Chipsets | Charsets | Panoramas | Backdrops | Facesets | Battle anims | Battle charsets | Monstres | Systems | Templates
RPG Maker XP: Tilesets | Autotiles | Characters | Battlers | Window skins | Icônes | Transitions | Fogs | Templates
RPG Maker VX: Tilesets | Charsets | Facesets | Systèmes
RPG Maker MV: Tilesets | Characters | Faces | Systèmes | Title | Battlebacks | Animations | SV/Ennemis