Night.png);">
Apprendre


Vous êtes
nouveau sur
Oniromancie?

Visite guidée
du site


Découvrir
RPG Maker

RM 95
RM 2000/2003
RM XP
RM VX/VX Ace
RM MV/MZ

Apprendre
RPG Maker

Tutoriels
Guides
Making-of

Dans le
Forum

Section Entraide

Sorties: "Dread Mac Farlane", (...) / Tutos: Checklist de la composition (...) / Sorties: Dread Mac Farlane - episode 8 / Sorties: Dread Mac Farlane - episode 7 / Jeux: Ce qui vit Dessous / Chat

Bienvenue
visiteur !




publicité RPG Maker!

Statistiques

Liste des
membres


Contact

Mentions légales

627 connectés actuellement

29434387 visiteurs
depuis l'ouverture

8763 visiteurs
aujourd'hui



Barre de séparation

Partenaires

Indiexpo

Akademiya RPG Maker

Blog Alioune Fall

Fairy Tail Constellations

Level Up!

RPG Fusion

Lunae - le bazar d'Emz0

Tous nos partenaires

Devenir
partenaire



forums

Index du forum > Entraide > [rpg maker xp] Script MapLink


hassen - posté le 15/12/2012 à 20:36:10 (580 messages postés)

❤ 0

Alien

Domaine concerné: teleportation
Logiciel utilisé: rpg maker xp
Voila je veux faire une téléportation de map a la zelda et je suis tombé sur le script "Maplink" mais voila le probléme ...a quoi sert exactement ce script ?
Si c'est pour faire defiler la 1ére map a la 2éme map sans passer par la transition ça ne marche pas avec ce script mais alors a quoi sert ce script ???

jai suivi le commentaire lettre par lettre : un évènement pour se teleporter comme d'habitude mais dans le nom de l'évènement, mettez : < MAPLINK> et c'est ce que jai fait !!!

voila le script pour plus d'info :

Portion de code : Tout sélectionner

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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
=begin
============
Maplinks - version 0.95 (2005-11-10)
============
by Wachunga
 
This script simplifies linking maps together: a single event sets up an
entire edge of the map as a teleport to another map. Players trying to
leave that edge of the current map are automatically teleported.
 
(This can also be achieved with many copies of teleport events along the edges
of a map or with a parallel-process event that sets variables and uses them to
teleport, but these methods are not optimal -- causing lag and/or inconvenience
for the mapper.)
 
To link a map with another on a specific edge (north, east, south or west),
create an event with <maplink> included in its name on the appropriate edge of
the map. (To avoid confusion, maplink events on corners of the map are
not valid.) Then, add a teleport ("Transfer Player") command to the event
to specify the destination map and other details (e.g. player direction,
fading on/off). If the destination is an east or west edge, then the Y
coordinate is calculated based on the player's Y coordinate when
teleporting; likewise, the X coordinate is calculated automatically when
the destination is a north or south edge.
 
Note: unlike normal teleport events, maplinks are activated when the player
tries to leave the screen instead of when stepping on the last tile. This
behaviour could be changed, but I feel that it's more natural this way:
it leaves the whole map open for actual exploration, instead of "wasting"
the outer tiles of a map.
 
=end
 
#-------------------------------------------------------------------------------
 
class Game_Event < Game_Character
alias ml_ge_init initialize
def initialize(map_id, event)
ml_ge_init(map_id, event)
if @event.name.upcase.include?('<MAPLINK>')
dir = nil
if @event.y == $game_map.height-1
dir = 2 unless @event.x == 0 or @event.x == $game_map.width-1
elsif @event.x == 0
dir = 4 unless @event.y == 0 or @event.y == $game_map.height-1
elsif @event.x == $game_map.width-1
dir = 6 unless @event.y == 0 or @event.y == $game_map.height-1
elsif @event.y == 0
dir = 8 unless @event.x == 0 or @event.x == $game_map.width-1
end
if dir != nil
@list.each { |command|
if command.code == 201
# make sure new location isn't be specified by variables
if command.parameters[0] == 0
$game_map.maplinks[dir] = Maplink.new(command.parameters)
break
end
end
}
end
end
end
end
 
#-------------------------------------------------------------------------------
 
class Game_Map
attr_accessor :maplinks
 
alias ml_gm_setup setup
def setup(map_id)
@maplinks = {}
ml_gm_setup(map_id)
end
 
def width(map_id = @map_id)
if map_id == @map_id
return @map.width
else
return load_data(sprintf("Data/Map%03d.rxdata", map_id)).width
end
end
 
def height(map_id = @map_id)
if map_id == @map_id
return @map.height
else
return load_data(sprintf("Data/Map%03d.rxdata", map_id)).height
end
end
 
end
 
#-------------------------------------------------------------------------------
 
class Maplink
 
def initialize(parameters)
@param = parameters
end
 
def activate
width = $game_map.width(@param[1])
height = $game_map.height(@param[1])
# modify x (p[2]) or y (p[3]) coordinates appropriately
if @param[2] == 0 or @param[2] == width-1
@param[3] = $game_player.y
elsif @param[3] == 0 or @param[3] == height-1
@param[2] = $game_player.x
end
# set up a dummy interpreter just for teleport
interpreter = Interpreter.new
interpreter.parameters = @param
interpreter.index = 0
interpreter.command_201
end
 
end
 
#-------------------------------------------------------------------------------
 
class Game_Player
 
alias ml_cett check_event_trigger_touch
def check_event_trigger_touch(x, y)
check_maplinks(x,y)
ml_cett(x,y)
end
 
def check_maplinks(x,y)
if $game_map.valid?(x, y) then return end
dir = nil
if y == $game_map.height then dir = 2
elsif x == -1 then dir = 4
elsif x == $game_map.width then dir = 6
elsif y == -1 then dir = 8
end
if dir != nil
if $game_map.maplinks[dir] != nil
$game_map.maplinks[dir].activate
end
end
end
 
end
 
#-------------------------------------------------------------------------------
 
class Interpreter
attr_accessor :parameters
attr_accessor :index
end



School Urban Legends


Ephy - posté le 15/12/2012 à 20:46:29 (30085 messages postés) - honor

❤ 0

[BIG SHOT]

D'après la 1ere ligne de commentaire ça semble téléporter automatiquement si on atteint un des bords de la map. Pour éviter de mettre 50 event de téléportation sur le bord.
Link=/= du link de Zelda dans ce cas... C'est juste un truc pour faire le lien entre les maps. Tu aurais pu balancer les indications du début dans un traducteur ça t'aurai aidé.



Power Level: 1 148 355,38|Mystic Slayer (Value!+)|Le monde d'Adélaïde|Reikon no Yume|★ H-Project|Toho Danmaku Arena|Loli versus Ponies|Mes vidéos|Ma galerie|Débuter sur VX:10, 11|Tuto: Importation de ressources|Mapper avec les RTP VX|Touhou|Fan de Omenides|Fan de Estheone|Eph'ille: 14


hassen - posté le 15/12/2012 à 20:56:02 (580 messages postés)

❤ 0

Alien

Ahh merçi a toi ephy je comprends mieu maintenant !!
au fait je chreche un script pour la teleportation a la zelda sans passer par la transitionsi tu pouvais m'aider
et en événement, cest fesable ?? si oui comment faire ?

School Urban Legends


BRESSON Johnny - posté le 15/12/2012 à 21:00:38 (659 messages postés)

❤ 0

Old Maker 2k3

ça me fait penser au " Gab Zelda Scroll " pour Ace.

Vidéo :



Lien : http://www.mundorpgmaker.com/forum/index.php?topic=100637.0

Si le virus ne vous tue pas, quelque chose d'autre s'en chargera !

Index du forum > Entraide > [rpg maker xp] Script MapLink

repondre up

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 - Mentions légales

Plan du site

Communauté: Accueil | Forum | Chat | Commentaires | News | Flash-news | Screen de la semaine | Sorties | Tests | Gaming-Live | Interviews | Galerie | OST | Blogs | Recherche
Apprendre: Visite guidée | RPG Maker 95 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker MV | Tutoriels | Guides | Making-of
Télécharger: Programmes | Scripts/Plugins | Ressources graphiques / sonores | Packs de ressources | Midis | Eléments séparés | Sprites
Jeux: Au hasard | Notre sélection | Sélection des membres | Tous les jeux | Jeux complets | Le cimetière | RPG Maker 95 | RPG Maker 2000 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker VX Ace | RPG Maker MV | Autres | Proposer
Ressources RPG Maker 2000/2003: Chipsets | Charsets | Panoramas | Backdrops | Facesets | Battle anims | Battle charsets | Monstres | Systems | Templates
Ressources RPG Maker XP: Tilesets | Autotiles | Characters | Battlers | Window skins | Icônes | Transitions | Fogs | Templates
Ressources RPG Maker VX: Tilesets | Charsets | Facesets | Systèmes
Ressources RPG Maker MV: Tilesets | Characters | Faces | Systèmes | Title | Battlebacks | Animations | SV/Ennemis
Archives: Palmarès | L'Annuaire | Livre d'or | Le Wiki | Divers