Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (dr_panther, Ayumi), 702 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
[Anet]removing client entities #291107
09/23/09 13:09
09/23/09 13:09
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
basically i have a few items, they remove perfectly on the server but still remain visible on the client and i wanted to know the best/easiest way to remove them.. too bad there's no enet_ent_remove ^^

the method i tried was to set a skill to 1 then send that skill back to the client which would in turn remove itself.. but i keep getting crashes so i'm not sure..

Re: [Anet]removing client entities [Re: darkinferno] #291110
09/23/09 13:24
09/23/09 13:24
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
of course there is enet_ent_remove() wink


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: [Anet]removing client entities [Re: Dark_samurai] #291117
09/23/09 13:46
09/23/09 13:46
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
L M A O.. now do i feel special... lol, and you know how many times i read through the manual -blushes and hides in shame-

-lol-

also... since this topic is pretty much pointless, i wanted to know how you handles team license, if i have two developers on my team and one is making minor changes to code, does he have to have the full version also, i guess so?

Re: [Anet]removing client entities [Re: darkinferno] #291136
09/23/09 14:58
09/23/09 14:58
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
i also found a slight problem, what i did was have an entity placed on the map create the item via enet_ent_create, what this results in however, is two entities being created on the client.. how do i create it only if its the server, i tried:

if (enet_get_connection() == SERVER_MODE || enet_get_connection() == CLIENT_SERVER_MODE)
enet_ent_create(_str("pistol.mdl"),my.x,_str("pickup"));

dint work at all....


Last edited by darkinferno; 09/23/09 15:05.
Re: [Anet]removing client entities [Re: darkinferno] #291174
09/23/09 17:28
09/23/09 17:28
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Quote:
also... since this topic is pretty much pointless, i wanted to know how you handles team license, if i have two developers on my team and one is making minor changes to code, does he have to have the full version also, i guess so?


If he also makes use of ANet he needs to buy a team licency or a full licency. The team licency can't be used for publishing a game but costs only 1/4 of a full version.
Please notice that if you buy a team licency, the team leader must own a full version!

Quote:
i also found a slight problem, what i did was have an entity placed on the map create the item via enet_ent_create, what this results in however, is two entities being created on the client.. how do i create it only if its the server, i tried:

if (enet_get_connection() == SERVER_MODE || enet_get_connection() == CLIENT_SERVER_MODE)
enet_ent_create(_str("pistol.mdl"),my.x,_str("pickup"));


This should work. What is the problem with this code?


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: [Anet]removing client entities [Re: Dark_samurai] #291221
09/23/09 22:51
09/23/09 22:51
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
it does work, the problem is... the entity doesnt get created on the server until a client joins, which makes no sense to me...

this is all thats in the function:

function pistol_pickup()
{
set(my,PASSABLE);
if(enet_get_connection() == SERVER_MODE || enet_get_connection() == CLIENT_SERVER_MODE)
enet_ent_create(_str("pistol.mdl"),my.x,_str("pickup"));
}

but strangely, it doesnt create anything on the server, but if i remove:
if (enet_get_connection() == SERVER_MODE || enet_get_connection() == CLIENT_SERVER_MODE)
from the above code then everytime a client joins, the entity gets created.. so am not entirely sure whats happening

Re: [Anet]removing client entities [Re: darkinferno] #291332
09/24/09 16:00
09/24/09 16:00
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Place an error("Test!"); above the if function. I'm pretty sure that the function isn't called.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: [Anet]removing client entities [Re: Dark_samurai] #291337
09/24/09 16:08
09/24/09 16:08
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
does he needs to sync something maybe? cause when the other client joins it syncs all the stuff so the pistol gets visible too. maybe that's the problem?



Ubi bene, ibi Patria.
Re: [Anet]removing client entities [Re: croman] #291339
09/24/09 16:20
09/24/09 16:20
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
The server doesn't need to synchronize anything. Synchronizing (enet_ent_synchronize()) does nothing more than creating all the global entities that exist on the server on the clients. You should test if enet_ent_create() is called after the client connected or if the entity only gets visible then (you can use the debug panel, ent row, to look if an entity was created and the error() function or the debugger to check if enet_ent_create() was called).


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: [Anet]removing client entities [Re: darkinferno] #291343
09/24/09 16:24
09/24/09 16:24
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
yea, but still... :)) anyway, can you post bigger part of that code where the error occurs?



Ubi bene, ibi Patria.
Page 1 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1