Okay, Im stumped [solved]

Started by Heretic86, April 03, 2013, 06:55:09 am

Previous topic - Next topic

Heretic86

April 03, 2013, 06:55:09 am Last Edit: April 03, 2013, 03:38:06 pm by Heretic86
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?
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Blizzard

You need a wait command before the turn command.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

KK20

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.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Heretic86

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. 
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)