Day.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

370 connectés actuellement

29420625 visiteurs
depuis l'ouverture

4849 visiteurs
aujourd'hui



Barre de séparation

Partenaires

Indiexpo

Akademiya RPG Maker

Blog Alioune Fall

Fairy Tail Constellations

Eclipso

RPG Maker Détente

Tous nos partenaires

Devenir
partenaire



Halt / Unhalt All Event Movement v1.1

Permet de stopper et reprendre le mouvement de tous les événements sur la carte avec quelques appels de script.

Script pour RPG Maker VX
Ecrit par PK8
Publié par cari974 (lui envoyer un message privé)
Signaler un script cassé

❤ 0

Permet de stopper et de relancer le mouvement des évènements.

Pour l'utiliser, appellez un script et entrer :
halt_all_movement : Pour arrêter tous les évènements
unhalt_all_movement : Pour relancer tous les évènements
toggle_halt_all_movement : Pour inversé le mode (arrêt ou marche)

D'autres fonctions plus avancés sont expliquées dans le script :
halt_all_movement(array, flag)
unhalt_all_movement(array, flag)
toggle_halt_all_movement(array, flag)


Script :

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
=begin
 
 Halt / Unhalt All Event Movement v1.1
 by PK8
 Created: 6/22/2012
 Modified: 6/27/2012
 ──────────────────────────────────────────────────────────────────────────────
 ■ Author's Notes
 This originally started off as an attempt to replicate RPG Maker 2003's
 Halt Movement system. When I was trying to look at how it worked (maybe I
 applied the event command wrong, or maybe I just misread it), nothing really
 halted. Trying to find a few ways didn't result in much so I threw my hands up
 and said "forget it."
 
 I hope people enjoy it all the same, even if it doesn't exactly replicate an
 event command from an older maker.
 ──────────────────────────────────────────────────────────────────────────────
 ■ Introduction
 This quickly written script lets users halt, unhalt, and toggle the halted
 state of all events (with the exception of any that may have been specified
 within the calls) with just a few quick script calls.
 ──────────────────────────────────────────────────────────────────────────────
 ■ Features
 o Halt all events with the exception of a few IDs specified in an array.
 o Unhalt all events with the exception of a few IDs specified in an array.
 o Toggle halt state of all events w/ the exception of some IDs set in an array.
 ──────────────────────────────────────────────────────────────────────────────
 ■ Changelog
 o v1     (06/22/2012): Initial Release
 o v1.1   (06/27/2012): Added a toggle halt state call. Users can now specify
                        exceptions using Ranges (Example: 0..5).
 ──────────────────────────────────────────────────────────────────────────────
 ■ Thanks
 o Kore, Bird_Eater, SolarGale, and Bravo2Kilo for viewing the stream.
 ──────────────────────────────────────────────────────────────────────────────
 ■ Calls
 
 Halt All Movement        : halt_all_movement(array, flag)
 Unhalt All Movement      : unhalt_all_movement(array, flag)
 Toggle Halt All Movement : toggle_halt_all_movement(array, flag)
   * array: Specify an array of events that would(n't) get (un)halted/get their
            halt state toggled. Ranges are allowed. Optional (none).
   * flag : Boolean value. Optional (true).
            * true: (un)halts/alters halt state of all but specified.
            * false: (un)halts/alters halt state of all specified.
 
=end
 
#==============================================================================
# ** Game_Interpreter
#------------------------------------------------------------------------------
#  An interpreter for executing event commands. This class is used within the
# Game_Map, Game_Troop, and Game_Event classes.
#==============================================================================
 
class Game_Interpreter
  #--------------------------------------------------------------------------
  # * Halt All Movement
  #     array : Specify an array of events that would(n't) get halted.
  #             Ranges are allowed. Optional.
  #     flag  : Boolean value. Optional.
  #             * true: halts all but specified
  #             * false: halts only specified
  #--------------------------------------------------------------------------
  def halt_all_movement(array = [], flag = true)
    array.each { | k |
      if k.is_a?(Range); k.each { | i | array.push(i) }; array.delete(k); end
    }
    $game_map.events.each { |k, v|
      # If flag == true, halts all events but those specified
      v.lock if !array.include?(k) and flag == true
      # If flag == false, halts events not specified
      v.lock if array.include?(k) and flag == false
    }
  end
  #--------------------------------------------------------------------------
  # * Unhalt All Movement
  #     array : Specify array of events that would(n't) get unhalted.
  #             Ranges are allowed. Optional.
  #     flag  : Boolean value. Optional.
  #             * true: unhalts all but specified
  #             * false: unhalts only specified
  #--------------------------------------------------------------------------
  def unhalt_all_movement(array = [], flag = true)
    array.each { | k |
      if k.is_a?(Range); k.each { | i | array.push(i) }; array.delete(k); end
    }
    $game_map.events.each { |k, v|
      # If flag == true, halts all events but those specified
      v.unlock if !array.include?(k) and flag == true
      # If flag == false, halts events not specified
      v.unlock if array.include?(k) and flag == false
    }
  end
  #--------------------------------------------------------------------------
  # * Toggle Halt All Movement
  #     array : Specify an array of events that would(n't) get their (un)halted
  #             state toggled. Ranges are allowed. Optional.
  #     flag  : Boolean value. Optional.
  #             * true: toggles halt state of all but specified
  #             * false: toggles halt state of only specified
  #--------------------------------------------------------------------------
  def toggle_halt_all_movement(array = [], flag = true)
    array.each { | k |
      if k.is_a?(Range); k.each { | i | array.push(i) }; array.delete(k); end
    }
    $game_map.events.each { |k, v|
      # If flag == true, halts all events but those specified
      if !array.include?(k) and flag == true
        (v.instance_eval("@locked") ? v.unlock : v.lock)
      # If flag == false, halts events not specified
      elsif array.include?(k) and flag == false
        (v.instance_eval("@locked") ? v.unlock : v.lock)
      end
    }
  end
end





Aucun commentaire n'a été posté pour le moment.

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