Griminy Nouveau membre
Messages : 61 Date d'inscription : 19/07/2012 Localisation : Belgique
Espace Maker Points d'aides: (3/100)
| Sujet: [VXAce] Prend ma place Ven 3 Aoû - 12:41 | |
| Script par XHTMLboy publié avec son autorisation DescriptionIl arrives parfois que les PNJ s en déplacement aléatoire bloque des passages. Grâce a ce script, en appuyant 2 fois dans la direction du PNJ si on se trouve a coté de lui, il va échanger sa place avec le joueur. Ne s'applique pas aux évènements immobiles et aux évènements dont le nom commence par ! (soit un point d'exclamation) InstallationCopier / coller le script au dessus de main - Code:
-
#============================================================================= # Author : S4suk3, Molok # Permet de Switcher de position avec certains PNJ's #============================================================================== #============================================================================== # ** Game_Event #------------------------------------------------------------------------------ # This class deals with events. It handles functions including event page # switching via condition determinants, and running parallel process events. # It's used within the Game_Map class. #============================================================================== class Game_Event #-------------------------------------------------------------------------- # * Alias #-------------------------------------------------------------------------- alias vx_update update #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update collide if @move_type != 0 and @priority_type == 1 and !(@event.name =~ /^!/) vx_update end #-------------------------------------------------------------------------- # * Collide with another event #-------------------------------------------------------------------------- def collide if(Input.trigger?(Input::LEFT) && @x+1==$game_player.x && @y==$game_player.y && $game_player.direction==4) temp_through = @through @through=true $game_player.move_straight(4) self.move_straight(6) @through=temp_through end if(Input.trigger?(Input::RIGHT) && @x-1==$game_player.x && @y==$game_player.y && $game_player.direction==6) temp_through = @through @through=true $game_player.move_straight(6) self.move_straight(4) @through=temp_through end if(Input.trigger?(Input::UP) && @x==$game_player.x && @y+1==$game_player.y && $game_player.direction==8) temp_through = @through @through=true $game_player.move_straight(8) self.move_straight(2) @through=temp_through end if(Input.trigger?(Input::DOWN) && @x==$game_player.x && @y-1==$game_player.y && $game_player.direction==2) temp_through = @through @through=true $game_player.move_straight(2) self.move_straight(8) @through=temp_through end end end [ | |
|
Kirkilou Administrateur
Messages : 578 Date d'inscription : 15/07/2012 Age : 24 Localisation : Devant mon Windows 7 Edition starter
Espace Maker Points d'aides: (100/100)
| Sujet: Re: [VXAce] Prend ma place Ven 3 Aoû - 13:19 | |
| C'est une très bonne idée ! Merci du partage ! | |
|