0 registered members (),
1,227
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: multiplayer, cannot connect with server
[Re: JohnnyIsDutch]
#334689
07/24/10 16:44
07/24/10 16:44
|
Joined: Aug 2003
Posts: 127 Berlin, Germany
CHaP
Member
|
Member
Joined: Aug 2003
Posts: 127
Berlin, Germany
|
Right. You can also try, to make the connection to the servers ip. Use -cl -ip [server IP] f.e.: acknex office.c -cl -ip 169.254.73.28 Another reason can be: [...] Stand alone server mode is only supported by the Professional Edition
|
|
|
Re: multiplayer, cannot connect with server
[Re: CHaP]
#334691
07/24/10 16:52
07/24/10 16:52
|
Joined: May 2010
Posts: 63
JohnnyIsDutch
OP
Junior Member
|
OP
Junior Member
Joined: May 2010
Posts: 63
|
Help me, i need a demo , not workshop25
Last edited by JohnnyIsDutch; 07/25/10 11:13.
|
|
|
Re: multiplayer, cannot connect with server
[Re: JohnnyIsDutch]
#334809
07/25/10 11:43
07/25/10 11:43
|
Joined: May 2010
Posts: 63
JohnnyIsDutch
OP
Junior Member
|
OP
Junior Member
Joined: May 2010
Posts: 63
|
here is a movie about my problem i hope it is help full look in HQ
Last edited by JohnnyIsDutch; 07/26/10 11:13.
|
|
|
Re: multiplayer, cannot connect with server
[Re: Aku_Aku]
#335010
07/26/10 11:02
07/26/10 11:02
|
Joined: May 2010
Posts: 63
JohnnyIsDutch
OP
Junior Member
|
OP
Junior Member
Joined: May 2010
Posts: 63
|
look in HQ, here is my project: it is from workshop 25 and here is my code:
////////////////////////////////////////////////////////////////////////////
// simple lite-C LAN game
////////////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
action player_move() // control the player on the client, move it on the server
{
var walk_percentage = 0;
while (1)
{
if (my.client_id == dplay_id) { // the following code runs on the player's client only
my.skill1 = key_w - key_s; // forward/backward
my.skill2 = key_a - key_d; // rotation
send_skill(my.skill1,0); // send skill1-2 to the server
send_skill(my.skill2,0);
}
if (connection & CONNECT_SERVER) { // the following code runs on the server only
my.pan += my.skill2*5*time_step; // rotate the entity using its skill2
var distance = my.skill1*5*time_step;
c_move(me, vector(distance,0,0), NULL, GLIDE); // move it using its skill1
walk_percentage += distance;
ent_animate(me,"walk",walk_percentage,ANM_CYCLE); // animate the entity
}
wait (1);
}
}
function main()
{
if (!connection)
error("Start as server or client!");
else
while (dplay_status < 2) wait(1); // wait until the session is opened or joined
dplay_localfunction = 2; // run actions both on server and client
level_load ("multiplayer6.wmb");
vec_set(camera.x, vector (-600, 0, 100)); // set a proper camera position
if (connection & CONNECT_SERVER) // this instance of the game runs on the server
ent_create ("redguard.mdl", vector (100, 50, 40), player_move); // then create the red guard!
else // otherwise, it runs on a connected client
ent_create ("blueguard.mdl", vector (-100,-50, 40),player_move); // create the blue guard
}
Last edited by JohnnyIsDutch; 07/26/10 11:12.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|