2 players

Posted By: prog

2 players - 07/16/07 12:27

i want 2 players to have the walk action, i want to control one with arrows and the other with WSAD keys.
And also if i create enties with ent_create(), then only the first selected player is visible but not both.
I want both the players to be visible on screen...
Posted By: nipx

Re: 2 players - 07/19/07 22:21

do you not use A6.22 and do you have at least the com edition?

if so, check locoweeds MP tutorial


nipx
Posted By: Felixsg

Re: 2 players - 07/20/07 07:09

You can't make that the keyboard can use more or four keys at the same time, is a better option to use keyboard and mouse or joystick

If you prees more of 4 keys then the control not respond
Posted By: Damocles

Re: 2 players - 07/20/07 12:10

Maby you move both players at the same time, at the same position

You defenitely need to put more information, to get any specific help for your problem
Posted By: prog

Re: 2 players - 07/23/07 06:24

I have 2 characters in my game,
And I want my main player to be controlled with arrows
and the second player(movement) with some other keys(WSAD).
Posted By: Damocles

Re: 2 players - 07/23/07 09:08

The most important question, as you never stated it:

is this a multiplayer setup?

And if it is:

You have to create both players on the server.

Then you have to assign actions on the server (one for each player), that
have for example a while(1) {....}
loop, that can react on key-inputs, and thus move the player it is assigned to.

To controll the player from the client, you have to send movecommands to the server

use send_var(); on the client.

for example:

var player1_forward; //variable

...

if(key_w){player1_forward=1;send_var(player1_forward);}

...

in the action (run on the server):

if(player1_forward){ent_move ..... player1 ... ; player1_forward=0;}


Post your code, if you have no Idea what is wrong with it.

Also try not to get into multiplayer, if you have not enough practise
with singleplayer code.
Posted By: Puppeteer

Re: 2 players - 07/23/07 15:53

@ Damocles:
I think he wants to make a split-screen game!
(that why he wants to use wasd and the arrows
© 2024 lite-C Forums