Chaos Project

RPG Maker => RPG Maker Scripts => Topic started by: Heretic86 on April 03, 2013, 06:55:09 am

Title: Okay, Im stumped [solved]
Post by: Heretic86 on April 03, 2013, 06:55:09 am
Can someone explain to me why this happens?

In Set Move Route, using the Jump command followed by a command that causes the Event to turn works fine.
In Set Move Route, entering jump(1,2) as a Script instead of a command causes an Event to turn early.

Suggestions?
Title: Re: Okay, Im stumped
Post by: Blizzard on April 03, 2013, 07:38:29 am
You need a wait command before the turn command.
Title: Re: Okay, Im stumped
Post by: KK20 on April 03, 2013, 12:28:44 pm
As to why that is, just look at Game_Character 3 under 'move_type_custom'. You'll quickly see that the problem is because of these:

        when 14  # Jump
          jump(command.parameters[0], command.parameters[1])
        end
        # If movement failure occurs when [Ignore if can't move] option is OFF
        if not @move_route.skippable and not moving? and not jumping?
          return
        end
        @move_route_index += 1


        when 45  # Script
          result = eval(command.parameters[0])
        end
        @move_route_index += 1

Using the command 'Jump' will not add onto @move_route_index while a script call will no matter what.
Title: Re: Okay, Im stumped
Post by: Heretic86 on April 03, 2013, 03:19:51 pm
Quote from: KK20 on April 03, 2013, 12:28:44 pm
As to why that is, just look at Game_Character 3 under 'move_type_custom'. You'll quickly see that the problem is because of these:

        when 14  # Jump
          jump(command.parameters[0], command.parameters[1])
        end
        # If movement failure occurs when [Ignore if can't move] option is OFF
        if not @move_route.skippable and not moving? and not jumping?
          return
        end
        @move_route_index += 1


        when 45  # Script
          result = eval(command.parameters[0])
        end
        @move_route_index += 1

Using the command 'Jump' will not add onto @move_route_index while a script call will no matter what.


Exactly what I was looking for.  Index was being advanced and executed prematurely.