Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Create a move rout with EventSpawner.

I was playing with the Sephirothspawn Event Spawner, but when i try to make a move route i get errors.

Well, I try to make it, but I can't get it, I know there is something to add, but I don't know what.

I get an error for undefined method for RPG::MoveCommand in this line ( arround last line of the following script, i mark it)
Code:
 

  #--------------------------------------------------------------------------

  # * Generate Move Route

  #

  #   list = [ <move_command>, ... ]

  #

  #   <move_command> : [code, parameters]

  #

  #   If no parameters required :

  #

  #   <move_command> : code

  #--------------------------------------------------------------------------

  def self.generate_move_route(list = [], repeat = true, skippable = false)

    # Creates New Move Route

    move_route = RPG::MoveRoute.new

    # Sets Repeat & Skipable

    move_route.repeat    = repeat

    move_route.skippable = skippable

    # Passes Through List

    for move_command in list

      if move_command.is_a?(Array)

        code, parameters = move_command[0], move_command[1]

      else

        code, parameters = move_command, []

      end

      # Crates New MoveCommand

      move_command = RPG::MoveCommand.new

      # Adds MoveCommand to List

      move_route << move_command

      # Sets MoveCommand Properties

      move_command.parameters = parameters

      move_command.code = code

    end

    # Add Blank Move Command

    move_route << RPG::MoveCommand.new #THIS LINE!!!

    # Return Move Route

    return move_route

  end

Well, who knows how to create a move route with EventSpawner or the Same Creator :biggrin: , can helpme with this?, thanks :).

The Complete script is here:

Script
 
One would think you'd put in this:

[rgss] 
list = [1,1,2] # 1 = Move down ; 2 = Move left ; 3 = Move right ; 4 = Move Up
generate_move_route(list, false, true) # no repeat, ignore if can't move
 
[/rgss]
 
It's been a while, but I believe Near is correct.

I am working on re-formatting this system, adding a few functions, as well as a code generator that allows you to make an event in XP, then run a call script and it gives you Event Spawner code to make that event. This script has been around long enough without me giving it an upgrade it deserves.
 
Well, you really don't need a function to give the code for most movements, just look in Game_Character (2) under 'def move_type_custom' and there's a list. That's how I figured it out. But judging from the look of the move_route function, yeah it needs an upgrade.

Maybe I could help with that? I have only limited knowledge of the RPG::Whatever classes, but I am learning and like to help people.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top