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 - episode 4 / Sorties: Star Trek: Glorious Wolf - (...) / Sorties: Dread Mac Farlane - episode 3 / News: Plein d'images cools créées par (...) / Sorties: Star Trek: Glorious Wolf - (...) / Chat

Bienvenue
visiteur !




publicité RPG Maker!

Statistiques

Liste des
membres


Contact

Mentions légales

419 connectés actuellement

29191804 visiteurs
depuis l'ouverture

6855 visiteurs
aujourd'hui



Barre de séparation

Partenaires

Indiexpo

Akademiya RPG Maker

Blog Alioune Fall

Fairy Tail Constellations

Hellsoft

Eclipso

RPG Fusion

Leo-Games

Zarok

Tous nos partenaires

Devenir
partenaire



forums

Index du forum > Entraide > [RESOLU] [RMVXACE] Pré-Animation avant une compétence


Kabyi - posté le 14/07/2020 à 18:47:22 (10 messages postés)

❤ 0

Domaine concerné: Compétences
Logiciel utilisé: RMVXACE
Bonjour/Bonsoir.

Cela fait un moment que je traîne sur le forum d'oniromancie pour trouver de nombreuses réponses à mes questions, mais pour le coup, je n'ai trouvé aucune réponse à mon problème actuelle, surement dû à la formulation de celui-ci, car je doutes que je sois le seul à m'être posé la question.

Bref, je travailles donc sur un jeu depuis un petit moment, et je cherche un moyen d'enclencher une Pré-animation de compétence, c'est à dire, à chaque fois que l'utilisateur lance un sort magique, ou une technique, un cercle apparaît sous-lui, comme une incantation.

Le but est donc d'enclencher deux animations à la fois. Pour les sorts ne visant que l'utilisateur, je peux tout faire en une seul animation comme tout se passe sur le même personnage, mais si celui-ci en vise un autre (un sort offensif), cela devient plus compliqué, comme le système de base de Rpg Maker VX Ace ne permet pas à une animation de viser deux endroits précis à la fois (comme l'utilisateur et l'ennemie ici en l'occurence).

Donc l'objectif a plusieurs possibilités :
- Pouvoir activer 2 compétences en une (la première serait la Pré-Animation qui n'aurait donc aucun effet)
- Que la compétence active deux animations l'une après l'autre
- Pouvoir cibler deux zones avec une même animation.

J'ai essayé de fonctionner avec des événements communs, mais cela n'a pas l'air de fonctionner.

Je précise que je ne sais pas produire de script, le script de combat n'est donc pas le mien, mais je pense que cela fonctionne a peu près pareil pour tous, je peux donc vous l'envoyer si besoin.

Je mets deux petites images toute simple au cas où je n'ai vraiment pas été clair, même si je pense que ce n'est pas très dur à comprendre x).

Merci d'avance !

image
image

En création d'un jeu depuis environ 2 ans, ayant abandonné le précédent.


MrHeimer - posté le 07/08/2020 à 14:47:56 (73 messages postés)

❤ 0

Salut, je débute personnellement, je ne sais pas si on peut convertir un pluggin de MV pour l'adapter à VX/ACE mais sur MV avec le pluggin de Yanfly Battle Engine core et ses 3 autres sous pluggins on peut créer des animations personnalisées facilement et donc enchainer deux animations d'affilées (par exemple faire une première animation, ensuite le déplacement vers l'ennemi, faire une deuxième animation de sort, puis frapper et revenir à l'emplacement initial)


gif - posté le 07/08/2020 à 15:50:41 (4782 messages postés) - staff

❤ 0

Egotrip Gigamaxé

Salut :),

Je ne sais pas quel script de combat tu utilises, donc c'est mal barré lol. Le système de combat de base de VX n'utilise pas de battler pour les héros, donc je ne peux pas te proposer de solution partant de là :tirlalangue2.

Itch.io | Twitter | Une IA qui génère des sprites de Pokémon | Cochouchou à la coupe du monde ! | le concours hebdomadaire du meilleur screen !


Kabyi - posté le 08/08/2020 à 09:09:37 (10 messages postés)

❤ 0

Bonjour,

Voici le script de combat que j'utilise :

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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
#===============================================================================
# Jet's Viewed Battle System
# By Jet10985(Jet)
#===============================================================================
# This script will add actor sprites into the battle scene.
# This script has: 10 customization options.
#===============================================================================
# Overwritten Methods:
# Game_Actor: use_sprite?, screen_x, screen_y
# Sprite_Battler: revert_to_normal
# Scene_Battle: show_attack_animation
#-------------------------------------------------------------------------------
# Aliased methods:
# Game_Enemy: screen_x, screen_y
# Sprite_Battler: update_origin, update_bitmap
# Window_BattleEnemy: update
# Window_BattleActor: update
# Window_ActorCommand: update
#===============================================================================
=begin
Set an enemy's attack animation by using this in their notebox:
 
<anim: 50>
 
Replace 50 with the animation id.
--------------------------------------------------------------------------------
You may use a sprite for a monster instead of a regular battler by using this
notetag in the monster's notebox:
 
<sprite: ImageName, 0>
 
Replace ImageName with the name of the spritesheet, and 0 with the index on the
spritesheet you want the monster to use.
=end
 
module Jet
  module VBS
    
    # Which direction do actors face on the field? There are 4 options:
    # :up, :down, :left, or :right. Actor's will direction chosen.
    ACTOR_ORIENTATION = :left
    
    # This will make it so actor's are centered on the screen instead of being
    # placed in pre-determined lines using START_POINT and SPACE_DIFFERENCE.
    CENTER_ACTORS = true
    
    # This is the x and y starting point for actors. This option may take one of
    # 2 functions. If CENTER_ACTORS is true, and ACTOR_ORIENTATION is either
    # :left, or :right, then only the x value will be used as where to center
    # the actors. If it is :down or :up, only the y value will be used.
    # If CENTER_ACTORS is false, then this is where actor's will begin to be
    # placed on screen.
    START_POINT = [400, 250]
    
    # This is how much space is between each actor on the field.
    SPACE_DIFFERENCE = 50
    
    # If you're using the :left or :right view, this will push each
    # subsequent actor back by a certain number of pixels, to avoid having
    # a straight line.
    SIDEVIEW_PUSH_BACK = 16
    
    # Do you want to reverse the direction and field during an ambush?
    # (This is when enemies surprise the player and get the first turn)
    REVERSE_FIELD_FOR_AMBUSH = false
    
    # this is how far the actor will move forward when they are selection an
    # action, as well as executing it.
    SLIDE_AMOUNT = 40
    
    # This is how far the actor will slide each frame until they reach their
    # goal of SLIDE_FORWARD. Best used when this is a factor of SLIDE_FORWARD.
    FRAME_SLIDE = 6
    
    # During selecting an actor command, and during selecting an enemy target,
    # would you like the selected character to flash?
    DO_FLASH = true
    
    # These are state-based sprite changes. If the actor has one of these states
    # then the game will search for a sprite of the character's regular sprite
    # name with the special state tag appended to it. So if Jimmy's sprite
    # name was $Jimmy, and he had poison inflcted on him, and poison's id was
    # listed here as ["_poison", 0], it would change Jimmy's in-battle sprite
    # to $Jimmy_poison at the first sprite index.
    STATE_SPRITES = {
    
      1 => ["", 0],
      2 => ["", 0]
      
    }
    
    # Do not touch this option.
    DIR_ORIENT = {right: 6, left: 4, down: 2, up: 8}[ACTOR_ORIENTATION]
    
  end
end
 
#===============================================================================
# DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO.
#===============================================================================
class Integer
  
  def even?
    self % 2 == 0
  end
  
  def odd?
    !even?
  end
end
 
class RPG::Enemy
  
  def animation
    (f = note.match(/<anim:[ ]*(\d+)>/i)) ? f[1].to_i : 1
  end
  
  def battle_sprite
    (f = note.match(/<sprite:[ ]*(.+),[ ]*(\d+)>/i)) ? f[1..2] : false
  end
end
 
module BattleManager
  
  class << self
    
    alias jet3845_on_encounter on_encounter
    def on_encounter(*args, &block)
      jet3845_on_encounter(*args, &block)
      @true_surprise = @surprise
    end
  end
  
  def self.true_surprise
    @true_surprise ||= false
  end
  
  def self.player_dir
    if @true_surprise && Jet::VBS::REVERSE_FIELD_FOR_AMBUSH
      return 10 - Jet::VBS::DIR_ORIENT
    else
      return Jet::VBS::DIR_ORIENT
    end
  end
end
 
class Game_Actor
  
  def use_sprite?
    true
  end
  
  def screen_x
    if [8, 2].include?(BattleManager.player_dir)
      if Jet::VBS::CENTER_ACTORS
        x = Graphics.width / 2
        x -= 16
        x += Jet::VBS::SPACE_DIFFERENCE / 2 if $game_party.members.size.even?
        x -= ($game_party.members.size / 2 - index) * Jet::VBS::SPACE_DIFFERENCE
        return x
      else
        return Jet::VBS::START_POINT[0] + Jet::VBS::SPACE_DIFFERENCE * index
      end
    end
    return Jet::VBS::START_POINT[0]
  end
  
  alias jet3745_screen_x screen_x
  def screen_x(*args, &block)
    x = jet3745_screen_x(*args, &block)
    case BattleManager.player_dir
    when 4
      x += Jet::VBS::SIDEVIEW_PUSH_BACK * index
    when 6
      x -= Jet::VBS::SIDEVIEW_PUSH_BACK * index
    end
    return x if !Jet::VBS::REVERSE_FIELD_FOR_AMBUSH
    x = Graphics.width - x if BattleManager.true_surprise && [6, 4].include?(BattleManager.player_dir)
    x
  end
  
  def screen_y
    if [6, 4].include?(BattleManager.player_dir)
      if Jet::VBS::CENTER_ACTORS
        y = Graphics.height / 2
        y -= 16
        y += Jet::VBS::SPACE_DIFFERENCE / 2 if $game_party.members.size.even?
        y -= ($game_party.members.size / 2 - index) * Jet::VBS::SPACE_DIFFERENCE
        return y
      else
        return Jet::VBS::START_POINT[1] + Jet::VBS::SPACE_DIFFERENCE * index
      end
    end
    return Jet::VBS::START_POINT[1]
  end
  
  alias jet3745_screen_y screen_y
  def screen_y(*args, &block)
    y = jet3745_screen_y(*args, &block)
    return y if !Jet::VBS::REVERSE_FIELD_FOR_AMBUSH
    y = Graphics.height - y if BattleManager.true_surprise && [8, 2].include?(BattleManager.player_dir)
    y
  end
  
  def screen_z
    101 + index
  end
  
  alias jet3745_character_name character_name
  def character_name(*args, &block)
    name = jet3745_character_name(*args, &block)
    return name unless SceneManager.scene_is?(Scene_Battle)
    states.sort {|a, b| b.priority <=> a.priority }.each {|a|
      if (add = Jet::VBS::STATE_SPRITES[a.id])
        return name + add[0]
      end
    }
    return name
  end
  
  alias jet3745_character_index character_index
  def character_index(*args, &block)
    index = jet3745_character_index(*args, &block)
    return index unless SceneManager.scene_is?(Scene_Battle)
    states.sort {|a, b| b.priority <=> a.priority }.each {|a|
      if (add = Jet::VBS::STATE_SPRITES[a.id])
        return index + add[1]
      end
    }
    return index
  end
end
 
class Game_Enemy
  
  alias jet3745_screen_x screen_x
  def screen_x(*args, &block)
    x = jet3745_screen_x(*args, &block)
    return x if !Jet::VBS::REVERSE_FIELD_FOR_AMBUSH
    x = Graphics.width - x if BattleManager.true_surprise && [6, 4].include?(BattleManager.player_dir)
    x
  end
  
  alias jet3745_screen_y screen_y
  def screen_y(*args, &block)
    y = jet3745_screen_y(*args, &block)
    return y if !Jet::VBS::REVERSE_FIELD_FOR_AMBUSH
    y = Graphics.height - y if BattleManager.true_surprise && [8, 2].include?(BattleManager.player_dir)
    y
  end
  
  def atk_animation_id1
    enemy.animation
  end
  
  def atk_animation_id2
    0
  end
  
  def bat_sprite?
    !!enemy.battle_sprite
  end
  
  def character_name
    enemy.battle_sprite[0]
  end
  
  def character_index
    enemy.battle_sprite[1].to_i
  end
  
  alias jet3745_character_name character_name
  def character_name(*args, &block)
    name = jet3745_character_name(*args, &block)
    return name unless SceneManager.scene_is?(Scene_Battle)
    states.sort {|a, b| b.priority <=> a.priority }.each {|a|
      if (add = Jet::VBS::STATE_SPRITES[a.id])
        return name + add[0]
      end
    }
    return name
  end
  
  alias jet3745_character_index character_index
  def character_index(*args, &block)
    index = jet3745_character_index(*args, &block)
    return index unless SceneManager.scene_is?(Scene_Battle)
    states.sort {|a, b| b.priority <=> a.priority }.each {|a|
      if (add = Jet::VBS::STATE_SPRITES[a.id])
        return index + add[1]
      end
    }
    return index
  end
end
 
class Sprite_Battler
  
  alias jet3835_update_bitmap update_bitmap
  def update_bitmap(*args, &block)
    if @battler.actor? || @battler.bat_sprite?
      actor_update_bitmap
    elsif @battler.enemy?
      jet3835_update_bitmap(*args, &block)
    end
  end
  
  def actor_update_bitmap
    @timer ||= 0
    @index ||= 1
    @char_index ||= @battler.character_index
    @back_time ||= false
    index = @index
    char_index = @char_index
    @timer += 1
    (@index += (@back_time ? -1 : 1); @timer = 0) if @timer == 19
    if @index == 3
      @back_time = true
      @index = 1
    elsif @index == -1
      @back_time = false
      @index = 1
    end
    @char_index = @battler.character_index
    bitmap = Cache.character(@battler.character_name)
    return if bitmap == @bitmap && index == @index && @char_index == char_index
    self.bitmap = bitmap
    sign = @battler.character_name[/^[\!\$]./]
    if sign && sign.include?('$')
      cw = bitmap.width / 3
      ch = bitmap.height / 4
    else
      cw = bitmap.width / 12
      ch = bitmap.height / 8
    end
    dir = BattleManager.player_dir
    dir = 10 - dir if @battler.is_a?(Game_Enemy)
    sx = (@battler.character_index % 4 * 3) * cw + (cw * @index)
    sy = (@battler.character_index / 4 * 4 + (dir - 2) / 2) * ch
    self.src_rect.set(sx, sy, cw, ch)
  end
  
  alias jet3745_update_origin update_origin
  def update_origin(*args, &block)
    if @battler.actor? || @battler.bat_sprite?
      actor_update_origin
    elsif @battler.enemy?
      jet3745_update_origin(*args, &block)
    end
  end
  
  def actor_update_origin
    self.ox = (@actor_ox ||= 0)
    self.oy = (@actor_oy ||= 0)
  end
  
  def revert_to_normal
    self.blend_type = 0
    self.color.set(0, 0, 0, 0)
    self.opacity = 255
    if bitmap && @battler && !@battler.actor? && !@battler.bat_sprite?
      self.ox = bitmap.width / 2 if bitmap
      self.src_rect.y = 0
    end
  end
  
  def slide_forward(amount = Jet::VBS::SLIDE_AMOUNT, frame = Jet::VBS::FRAME_SLIDE)
    dir = BattleManager.player_dir
    dir = 10 - dir if @battler.is_a?(Game_Enemy)
    case dir
    when 2
      affect = :@actor_oy
      frame *= -1
    when 4
      affect = :@actor_ox
      amount *= -1
    when 6
      affect = :@actor_ox
      frame *= -1
    when 8
      affect = :@actor_oy
      amount *= -1
    end
    orig_amount = amount
    until (orig_amount < 0 ? amount >= 0 : amount <= 0)
      instance_variable_set(affect, instance_variable_get(affect) + frame)
      amount += frame
      SceneManager.scene.spriteset.update
      Graphics.update
    end
  end
  
  def slide_backward(amount = Jet::VBS::SLIDE_AMOUNT, frame = Jet::VBS::FRAME_SLIDE)
    dir = BattleManager.player_dir
    dir = 10 - dir if @battler.is_a?(Game_Enemy)
    case dir
    when 2
      affect = :@actor_oy
      amount *= -1
    when 4
      affect = :@actor_ox
      frame *= -1
    when 6
      affect = :@actor_ox
      amount *= -1
    when 8
      affect = :@actor_oy
      frame *= -1
    end
    orig_amount = amount
    until (orig_amount < 0 ? amount >= 0 : amount <= 0)
      instance_variable_set(affect, instance_variable_get(affect) + frame)
      amount += frame
      SceneManager.scene.spriteset.update
      Graphics.update
    end
  end
end
 
class Scene_Battle
  
  attr_reader :spriteset
  
  def show_attack_animation(targets)
    show_normal_animation(targets, @subject.atk_animation_id1, false)
    show_normal_animation(targets, @subject.atk_animation_id2, true)
  end
  
  alias jet3746_use_item use_item
  def use_item(*args, &block)
    sprite = @spriteset.battler_to_sprite(@subject)
    if (@subject.actor? || @subject.bat_sprite?) && !@subject.current_action.guard?
      sprite.slide_forward
    end
    jet3746_use_item(*args, &block)
    if (@subject.actor? || @subject.bat_sprite?) && !@subject.current_action.guard?
      sprite.slide_backward
    end
  end
end
 
class Spriteset_Battle
  
  def battler_to_sprite(actor)
    battler_sprites.each {|a|
      return a if a.battler == actor
    }
    return false
  end
end
 
class Window_BattleEnemy
  
  alias jet3745_update update
  def update(*args, &block)
    jet3745_update(*args, &block)
    if self.active && Jet::VBS::DO_FLASH
      if Object.const_defined?(:Mouse)
        $game_troop.alive_members.each {|a|
          img = SceneManager.scene.spriteset.battler_to_sprite(a)
          x = img.x - img.ox
          y = img.y - img.oy
          if Mouse.area?(x, y, img.src_rect.width, img.src_rect.height)
            self.index = a.index
          end
        }
      end
      active_troop = $game_troop.alive_members[@index]
      sprite = SceneManager.scene.spriteset.battler_to_sprite(active_troop)
      sprite.start_effect(:whiten) if !sprite.effect?
    end
  end
end
 
class Window_BattleActor
  
  alias jet3745_update update
  def update(*args, &block)
    jet3745_update(*args, &block)
    if self.active && Jet::VBS::DO_FLASH
      if Object.const_defined?(:Mouse)
        $game_party.alive_members.each {|a|
          img = SceneManager.scene.spriteset.battler_to_sprite(a)
          x = img.x - img.ox
          y = img.y - img.oy
          if Mouse.area?(x, y, img.src_rect.width, img.src_rect.height)
            self.index = a.index
          end
        }
      end
      active_troop = $game_party.members[@index]
      sprite = SceneManager.scene.spriteset.battler_to_sprite(active_troop)
      sprite.start_effect(:whiten) if !sprite.effect?
    end
  end
end
 
class Window_ActorCommand
  
  alias jet3745_update update
  def update(*args, &block)
    jet3745_update(*args, &block)
    if self.active && Jet::VBS::DO_FLASH
      active_troop = @actor
      sprite = SceneManager.scene.spriteset.battler_to_sprite(active_troop)
      sprite.start_effect(:whiten) if !sprite.effect?
    end
  end
end
 
class Game_Action
  
  def guard?
    item == $data_skills[subject.guard_skill_id]
  end
end



Il est on ne peut plus simple, l'objectif principal étant d'avoir une sideview.

Donc si on ne peut rien faire avec celui-ci, mais qu'on peut le faire avec un autre offrant également une sideview, je prends avec plaisir.

Merci de votre aide :)

En création d'un jeu depuis environ 2 ans, ayant abandonné le précédent.


HuLijin - posté le 08/08/2020 à 10:18:41 (997 messages postés)

❤ 0

Yeoun, mage-archère-louve

Citation:

mais je pense que cela fonctionne a peu près pareil pour tous

Nope.

Citation:

Il est on ne peut plus simple, l'objectif principal étant d'avoir une sideview.

Tu ne devrais pas avoir de mal à l'adapter à ce que tu veux du coup !

Plus sérieusement, c'est à toi de chercher s'il existe un script de combat qui fait ce que tu veux (ou un script de combat et un "sous-script" qui fait ce que tu veux, ou encore un script d'animation compatible avec ton système de combat).

Des bouts de code à voir avec ton problème si ça peut aider Gif. Je n'ai pas VX Ace donc je ne peux pas aider davantage.

Portion de code : Tout sélectionner

1
2
3
# Overwritten Methods:
# ...
# Scene_Battle: show_attack_animation



Portion de code : Tout sélectionner

1
2
3
4
def show_attack_animation(targets)
    show_normal_animation(targets, @subject.atk_animation_id1, false)
    show_normal_animation(targets, @subject.atk_animation_id2, true)
  end



Et d'autres bouts de code par-ci par-là (acquisition de l'ID du skill d'animation des ennemis)


Si la commande d'événement Force Action ne donne rien, j'ai pas d'idées autres que du script. Peut-être du script dans la formule de dégâts ?
Un truc du style show_animation(a, ID animation) (pareil, sans le code de Ace sous les yeux, je ne peux pas plus aider).

M.V.


Kabyi - posté le 08/08/2020 à 11:11:05 (10 messages postés)

❤ 0

Citation:

Nope.


Cela reste du RGSS

Citation:

Tu ne devrais pas avoir de mal à l'adapter à ce que tu veux du coup !


Ce que je voulais dire par "simple", c'est qu'il n'offre pas de contenu significatif autre qu'une sideview, je sais que d'autres scripts ont d'autres fonctionnalités qui permettent, par exemple, de faire apparaître des icônes d'items, pour des boomerang qui reviennent ou d'autres effets dans ce style. Je n'ai jamais dit que je maîtrisais parfaitement le script et donc que je pouvais l'adapter à ma guise, ton interprétation n'était pas la bonne.

Citation:

Plus sérieusement, c'est à toi de chercher s'il existe un script de combat qui fait ce que tu veux (ou un script de combat et un "sous-script" qui fait ce que tu veux, ou encore un script d'animation compatible avec ton système de combat).


J'ai déjà farfouillé tout les scripts de combats que j'ai pu trouver, j'y ai passé des heures sans aboutissements, donc c'est pour cela que j'ai crée ce topic, je ne l'aurai pas fait si ce que je recherche existait déjà et était publié, c'est logique.

Citation:

Des bouts de code à voir avec ton problème si ça peut aider Gif. Je n'ai pas VX Ace donc je ne peux pas aider davantage.


Je vais déjà étudier ça, en attendant une potentielle autre réponse, merci.

En création d'un jeu depuis environ 2 ans, ayant abandonné le précédent.


gif - posté le 08/08/2020 à 11:20:43 (4782 messages postés) - staff

❤ 1

Egotrip Gigamaxé

Salut,

J'ai obtenu un résultat qui s'approche de ce que tu souhaites avoir :

image
"Pré-animation" sur le lanceur du skill/sort, avant de lancer l'animation elle-même.

Bon, j'ai pris une animation au hazard qui avait un semblant de cercle d'incantation :p.

Voila mon code, à placer au dessus de main :

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
#===============================================================================
# Preanimation on skill cast
# By Oniromancie (rpg-maker.fr)
#===============================================================================
# This script will allow you to specify an animation before the cast of a skill
# Use the tag <preanim:ANIM_ID> in the skill notebox
# example : <preanim:30>
 
class Scene_Battle < Scene_Base
  
  #--------------------------------------------------------------------------
  # * preAnimationId
  #     note : the content of the skill notebox
  #--------------------------------------------------------------------------
  def get_preanim_Id(note)
    (f = note.match(/<preanim:[ ]*(\d+)>/i)) ? f[1].to_i : 0
  end
  
  #--------------------------------------------------------------------------
  # * Show Animation  ==> overwrite from Scene_Battle
  #     targets      : Target array
  #     animation_id : Animation ID (-1:  Same as normal attack)
  #--------------------------------------------------------------------------
  alias preanim_show_animation show_animation
  def show_animation(targets, animation_id)
    if animation_id < 0
      show_attack_animation(targets)
    else
      # begin EDIT ---------------------------------
      if @subject.actor?
        preanimation_id = get_preanim_Id(@subject.current_action.item.note)
        if preanimation_id > 0
          print preanimation_id
          show_normal_animation([@subject], preanimation_id)
          wait_for_animation
        end
      end
      # end EDIT   ---------------------------------
      show_normal_animation(targets, animation_id)
    end
    @log_window.wait
    wait_for_animation
  end
end



Pour le faire fonctionner, il faut renseigner l'animation à jouer en tant que "pré-animation" dans le champ commentaire d'un skill :

Portion de code : Tout sélectionner

1
<preanim:37>



Tu me dis si t'as un soucis, j'suis pas expert et dans 30 jours ma version d'évaluation de VXace expirera :p.

Itch.io | Twitter | Une IA qui génère des sprites de Pokémon | Cochouchou à la coupe du monde ! | le concours hebdomadaire du meilleur screen !


Kabyi - posté le 08/08/2020 à 11:42:21 (10 messages postés)

❤ 0

C'est juste parfait, je te remercie infiniment :D

En création d'un jeu depuis environ 2 ans, ayant abandonné le précédent.


Gari - posté le 08/08/2020 à 15:38:03 (5899 messages postés) - honor

❤ 0

Gif, ça te dérange si on poste ton snippet dans les scripts ? (par contre il y aura ton nom dessus :F)


gif - posté le 08/08/2020 à 16:32:21 (4782 messages postés) - staff

❤ 0

Egotrip Gigamaxé

Okidac mais ça va avec le script partagé de kabyi du coup, Il ne donne rien tout seu! :).

Itch.io | Twitter | Une IA qui génère des sprites de Pokémon | Cochouchou à la coupe du monde ! | le concours hebdomadaire du meilleur screen !

Index du forum > Entraide > [RESOLU] [RMVXACE] Pré-Animation avant une compétence

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