|
1 registered members (AndrewAMD),
599
guests, and 3
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
how do i get the client id?
#144257
07/29/07 03:50
07/29/07 03:50
|
Joined: Aug 2004
Posts: 1,305 New York
PrenceOfDarkness
OP
Serious User
|
OP
Serious User
Joined: Aug 2004
Posts: 1,305
New York
|
I really want to get started using send_var_id and send_string_id, however the manual gives no examples on how to use ANY _id function. Further more the manual stats that the event_join event_type gives off the client_id as it's 2nd argument. However we aren't told what type of variable the client_id is, nor are we show an example on how to store it. The manual also says the client_id is stored into the struct of a client created entity, but again we are not shown how to retreat this client_id. Some clearing up would be nice. I've asked on the multiplayer thread already but no one has been able to help me, so i decided to finally go ahead and ask conitec 
"There is no problem that can't be solved with time and determination." -me prenceofdarkness for instant messages on AIM.
Looking for a model designer PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
|
|
|
Re: how do i get the client id?
[Re: PrenceOfDarkness]
#144258
08/01/07 03:47
08/01/07 03:47
|
Joined: Aug 2004
Posts: 1,305 New York
PrenceOfDarkness
OP
Serious User
|
OP
Serious User
Joined: Aug 2004
Posts: 1,305
New York
|
some help would be nice  Also i've created an entity on the client with ent_create, and i can't seem to control it on the server like i did in A6, is there some kind of change?
"There is no problem that can't be solved with time and determination." -me prenceofdarkness for instant messages on AIM.
Looking for a model designer PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
|
|
|
Re: how do i get the client id?
[Re: PrenceOfDarkness]
#144261
08/06/07 05:59
08/06/07 05:59
|
Joined: Aug 2004
Posts: 1,305 New York
PrenceOfDarkness
OP
Serious User
|
OP
Serious User
Joined: Aug 2004
Posts: 1,305
New York
|
this is for JCL for when he gets back: Code:
function server_event(STR,NUM) { client_name = STR; client_id = NUM; temp = NUM; str_for_num(client_id_str,client_id); wait(-1); send_var_id(temp,client_id); player = ent_create(testing_mdl,0,testing_function); wait(-1); player.skill1 = client_id; }
everytime I go to use this script my game crashes and no reason is given... obviously there is a problem. I know it's send_var_id because when I comment it out the game doesnt crash.
"There is no problem that can't be solved with time and determination." -me prenceofdarkness for instant messages on AIM.
Looking for a model designer PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
|
|
|
Re: how do i get the client id?
[Re: jcl]
#144263
08/06/07 21:22
08/06/07 21:22
|
Joined: Aug 2004
Posts: 1,305 New York
PrenceOfDarkness
OP
Serious User
|
OP
Serious User
Joined: Aug 2004
Posts: 1,305
New York
|
jcl... i'll give it a try later 2night, but right now the only thing that is being sent to the server is when the client joins... nothing else happens after that... but like i said let me give it a try.
"There is no problem that can't be solved with time and determination." -me prenceofdarkness for instant messages on AIM.
Looking for a model designer PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
|
|
|
Re: how do i get the client id?
[Re: PrenceOfDarkness]
#144264
08/07/07 02:45
08/07/07 02:45
|
Joined: Aug 2004
Posts: 1,305 New York
PrenceOfDarkness
OP
Serious User
|
OP
Serious User
Joined: Aug 2004
Posts: 1,305
New York
|
okay jcl i think i understood what you were saying. The real problem i'm having but is that i can't seem to control the entity on the client side no matter what i do. Code:
action testing_function() { wait(-2); ent_sendnow(my); // wait(-1); proc_local(my,local_testing); wait(-2); // my.smask |= NOSEND; // lite-C wait(-3); // beep();beep();beep(); while(1) { wait(1); my.pan += 10; } }
function main() { ... if(connection==2) { player = ent_create(testing_mdl,vector(0,0,50),testing_function); wait(-1); str_cpy(str_welcome,"Welcome Client"); } ... }
All that happens is the player is created and thats it. The action function is simply telling the test model to increase it's pan by 1 in an endless while loop. When i create it on the server it's fine, but when I create it on the client, nothing happens at all, the model doesn't move on the server or the client... Why?
"There is no problem that can't be solved with time and determination." -me prenceofdarkness for instant messages on AIM.
Looking for a model designer PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
|
|
|
Re: how do i get the client id?
[Re: jcl]
#144266
08/22/07 05:49
08/22/07 05:49
|
Joined: Aug 2004
Posts: 1,305 New York
PrenceOfDarkness
OP
Serious User
|
OP
Serious User
Joined: Aug 2004
Posts: 1,305
New York
|
yes JCL but if you look inside testing_function you'll see "proc_local(my,local_testing);". The action local_testing is nothing complex. Here take a look: Code:
action local_testing() { wait(-3); // beep();beep();beep(); while(1) { wait(1); my.pan += 10; } }
It's like it was completely ignoring proc_local. Is proc_local no longer valid?
"There is no problem that can't be solved with time and determination." -me prenceofdarkness for instant messages on AIM.
Looking for a model designer PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
|
|
|
|