Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Paladin

1
Greetings,

I am using RPG Maker Ace, and it's very fun to use. I am trying to implement local two player capability. I've searched the web and it appears the only option right now is this script from Tsukihime:

http://www.rpgmakercentral.com/topic/4128-simple-2-player-script-development/

I followed his instructions, and it works just as he described; However, it has limitations. It creates a copy of the player sprite and allows you to control that as a second player, but you can't make the two players have separate sprites (as far as I am aware!).

Now despite knowing practically nothing about script programming, I really wanted to try and solve this myself. So I spent a long while modifying things in the script editor, deleting and testing, modifying script (don't worry, I ensured to undo any of the damage I caused after I tested).

My tampering was not altogether useless however. I discovered the following:

In "Spriteset_Map" in the script editor, go to about line 60, and you'll see the "Create Character Sprite" section. At the bottom of that small section there is the following code:

@character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
    @map_id = $game_map.map_id

When I saw 'game_player' at the end, I decided to try and change it to 'game_player2' like in Tsukihime's script. The results were exciting.   :)

The first actor of the initial party could be controlled with the multiplayer script (w,a,s,d keys), and second actor in the initial party could be controlled with the default keys.

In Database on the System tab you can change the sprite of both characters to whatever you wanted.

But there is one catch. The movement of the default keys player is now delayed. To change direction, you have to press the key 2-3 times, and the player will move in it's initial direction one tile before moving correctly. Very odd. It reminded me of followers.

My theory is that if the follower movement delay was gone, the movement of the default keys player would be normal.

But alas, I know nothing of scripting. So while I'm suspecting this to be the culprit:

Script Editor > Game_Follower, at about line 55 there is a section called "Pursue Preceding Character"

....I really have not the slightest idea on how to fix it. I could be way off base. Sorry for the lengthy description, it all seems so complicated.  :???:  Any help is appreciated!