Help - Search - Members - Calendar
Full Version: [Eventing]RPG Maker XP 2 Player (Essentially)
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion > RPG Maker XP Tutorials
Despair From The Dark
Using Conditional Branches, I found a way to control an NPC using W,A,S,D. I wasn't sure if this was something that's already been done. So I figured I'd let you know, and post a bit of an example. It isn't a demo, I haven't really added instructions or anything. Figured I'd do that in this thread. First of all, the main character is still controlled as usual. The 2nd person uses: W=Up, A=Left, S=Down, and D=Right. Because of the way it is done, if you press any button for more then a split second, you'll walk 2 spaces instead of 1. I'm still working on a way to fix that. Also, I made it so if you press Q, the 2nd player will automatically run through all obstacles, and go straight to player 1. I figured this would be useful, seeing as 2nd player moves slightly slower then player 1. Player 2 cannot activate events, as far as I'm aware. Haven't really tested it. But Player 2 is also physical, so it will interrupt the movement of both player 1, and other events. This could be an issue, unless taken into account. Anywho, this is something I thought other people could use, and advance. So instead of listening to me ramble on, I'll just post the example game I made. If you have any questions just ask. Until then I'll probably continue to work on it.

Click to view attachment

You'll need a program to unzip it, but that's the only way I can think of to post it. Tell me what you think, and feel free to ask any questions.
HeroOfHyla
Thanks for contributing to the forum! Unfortunately I don't have RMXP so I can't test it, but I think I understand the general idea.
vdeijk
Nice idea. But both players would have to be using the same keyboard, right? That doesn't sound very comfortable. I doubt you could make a full game that way.

Maybe it would work for a few minigames or something.
Bandito
It is very possible to make a game like this but only if you use 2 game controllers and a program like joy2(something) to emulate the keyboard in the controllers.
Nuque
Well, the only bad part is this can't be done on VX wihtout a script, conisdering the lack of a Button Input fundtion.
Oko
QUOTE (Shantanu @ Jul 6 2009, 05:36 PM) *
Well, the only bad part is this can't be done on VX wihtout a script, conisdering the lack of a Button Input fundtion.

VX has a Button Input function. It's on page 4 of the conditional branch menu--if Button [x] is pressed. There's Up, Down, left, Right, A, B, C, X, Y, Z, L, and R.
Bandito
Disregard this post.
Nuque
QUOTE (Okoga @ Jul 6 2009, 03:55 PM) *
QUOTE (Shantanu @ Jul 6 2009, 05:36 PM) *
Well, the only bad part is this can't be done on VX wihtout a script, conisdering the lack of a Button Input fundtion.

VX has a Button Input function. It's on page 4 of the conditional branch menu--if Button [x] is pressed. There's Up, Down, left, Right, A, B, C, X, Y, Z, L, and R.


Yea, but how do you make a game with 2 players with only those buttons? 8 for moving, 2 for selection, 2 for deselection, 0 for anything else.
Imsosupafly
Ill try it and mess with it, I might be able to fix a few of those problems, if so Ill post back, if not I will probably hang my head in shame. . . laugh.gif

I made some progress. I switched it to common events and set it so instead of turning he just moves directly left, and then both players move at the same speed. I tried to make it so player two could touch events too, but I couldn't get it to work so I tried to script a little bit and here is what I tried.

I tried to copy almost the entire Game_Player script, except edit the class and functions so It would work for player two, I also took away the screen moving scripts so it wouldn't interfere with the other script with player one.

Unfortunately I messed something up and I kept getting syntax errors, but Im sure if I would have been able to get that to work, it would have ran a lot better than having player two as an event, but instead as another player.

Maybe its not possible though, but it could be. Im very new to scripting, and Im sure there were other scripts that I needed to make that work, but if you could figure it out, it would be a pretty good script to use. (If its possible)

Anyways, Im going to have to hang my head on this one sleep.gif
Redd
Pretty cool, if I must say so myself. I'll definitely look into it! I could make a function in Aradiah where once you get a kid then player 2 can control him! That would be pretty awesome.
Just a thing that I thought might be cool to add, making it so that player 2 can push around rocks and other objects (since it is an event it pretty much can't act)
Imsosupafly
QUOTE (Redd @ Jul 24 2009, 04:44 PM) *
Pretty cool, if I must say so myself. I'll definitely look into it! I could make a function in Aradiah where once you get a kid then player 2 can control him! That would be pretty awesome.
Just a thing that I thought might be cool to add, making it so that player 2 can push around rocks and other objects (since it is an event it pretty much can't act)


You could make things event touch, although it would also allow other things to touch it as well
ninjaheldransom
im going to try this in my game, but im not sure thought becuase some of the previous script for 2p werent that good, but ill try it for myself and give you the feedback on it. dude by from what i read around here in the thread seems to be good
Jamopc
This would be awesome for making a one player game that requires that has two independent characters to be controlled by the player. Make it fast, really difficult but with a great prize for the first person that completes it (which would be nearly impossible) and get them to film their attempts...NOW THAT'S ENTERTAINMENT!

laugh.gif
Despair From The Dark
Wow... I haven't been to the forums for quite some time, seeing as I haven't been working on my RPG for several months. (School, vacationing to Michigan all summer, more school etc.) And I come back to find out people actually cared that I made this. I mean, that means a lot. I know it isn't perfect, but it's nice to know some people at least checked it out. So thank you everyone. This really makes me want to work on it s bit more. See if I can't improve it. Also, I like the idea of being able to use two controllers to play. That might work. If I had some, I'd check it out. Anywho, thanks again, and if I find anything new, I'll let you know. smile.gif
BlaZe22
I'm aware I'm bumping a year old thread, and I'm sorry.
I just found this resource today and Registered an account to download it.

I think it's really good. I'd just like to make a note I fixed one small bug

QUOTE
Because of the way it is done, if you press any button for more then a split second, you'll walk 2 spaces instead of 1.


I managed to fix this using a 'wait' command in the Set Move Route command in the event.
It really reduces the amount of 'overstepping' you do and almost emulates the same movement as Player 1.

Here's a pic of the fix using a (recommended) 3 frame wait command:

http://img21.imageshack.us/img21/4976/movementfix.png
(not hotlinked because of size)

Hope this can somehow help someone out there. Just thought I'd help ya'll as this helped me.
roxanne410


QUOTE (Despair From The Dark @ May 13 2009, 03:41 AM) *
Using Conditional Branches, I found a way to control an NPC using W,A,S,D. I wasn't sure if this was something that's already been done. So I figured I'd let you know, and post a bit of an example. It isn't a demo, I haven't really added instructions or anything. Figured I'd do that in this thread. First of all, the main character is still controlled as usual. The 2nd person uses: W=Up, A=Left, S=Down, and D=Right. Because of the way it is done, if you press any button for more then a split second, you'll walk 2 spaces instead of 1. I'm still working on a way to fix that. Also, I made it so if you press Q, the 2nd player will automatically run through all obstacles, and go straight to player 1. I figured this would be useful, seeing as 2nd player moves slightly slower then player 1. Player 2 cannot activate events, as far as I'm aware. Haven't really tested it. But Player 2 is also physical, so it will interrupt the movement of both player 1, and other events. This could be an issue, unless taken into account. Anywho, this is something I thought other people could use, and advance. So instead of listening to me ramble on, I'll just post the example game I made. If you have any questions just ask. Until then I'll probably continue to work on it.

Click to view attachment

You'll need a program to unzip it, but that's the only way I can think of to post it. Tell me what you think, and feel free to ask any questions.


That's actually so smart. I'm going to check it out right now, because this may be very useful in the long-run for many game makers smile.gif
Xyore
I've managed to place a switch that allows inclusion of another party member when used. I also created several common events that may result in being extemely useful. I would set up a link, but I don't know how. After someone shows me, I'll have a link up and ready.
Redd
QUOTE (Xyore @ Dec 25 2010, 03:24 AM) *
I've managed to place a switch that allows inclusion of another party member when used. I also created several common events that may result in being extemely useful. I would set up a link, but I don't know how. After someone shows me, I'll have a link up and ready.


You can compress the game folder down to a .zip or .rar folder, then upload it to:

http://www.mediafire.com/
http://www.megaupload.com/
http://www.uploading.com/
http://www.wikiupload.com/

And then copy and paste your download link inside of a post.
(There are many other uploaders, these are just some I pulled off of Google. I would suggest MediaFire, however)


Anywho, back on topic, I love this idea, and thank you very much BlaZe22, that is very, very useful and it looks like you have already proven yourself useful to the community!
Xyore
I've recreated the common events to make them easier to use. Also, I have added a common event that starts off the 2P event in caterpillar mode until you press W, A, S, or D. Once the caterpillar mode is off, after pressing Z, the switch turns back on. I'll upload it as soon as possible.

Edit: I'm unable to upload it at this point. It may take at least a week before I can upload it because of some personal issues. Rest assured, it will be uploaded.
Klokinator
There was a game that came out some time back (Forgot the title or even who the characters were) but you had to control two characters simultaneously using one set of keys and the other two. It was a one player puzzle game. Ths script would also be good for that kind of game.
Xyore
The game you're talking about happens to be Cast Aside. The way I'm making it is completely multiplayer, however. As in, making an extra actor that can alter gameplay.
Naridar
It could've also been FireBoy and WaterGirl from miniclip.com. I'm planning on creating a similar game for RMXP, so this system will be VERY useful. Thank you very much!
arnquist
I found something similar to this (or maybe the same thing) on youtube channel 'foodjerk' and I've been tweaking it.

If you add 'wait for move's completion' to the beginning of the event it will behave more normally and not move extra spaces.

I added more conditional branches to allow 8 directional movement.
I added more conditional branches to prevent player 2 from moving off screen.
I added more conditional branches to make her cast magic (I'm using the XAS battle engine.)

I've gotten to a point where the event has so many conditional branches that it causes player 1 to lag. The typical way of reducing lag (adding wait 1 frame) is no good because it makes player 2's movement jerky.

So I guess it's time to learn scripting...?

I noticed in Wortana's 2 player engine there is credit to Original XP Version by Hima. Does anyone know where I can find that script?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.