• Loading an entity on joining
    3 replies, posted
Let's say I have specific entities that players need to see or rather that their game needs to detect as soon as they join the server, even if they haven't went close enough to them for the map to load the entity, how would I do that? I'll try to make a simple example, say I have flags, like a capture the flag gamemode. I want players to, as soon as they join, load that flag entity regardless of where it is on the map, to be able to detect it and so the game can run the functions associated to it, even if normally it wouldn't load it if the flag was too far away.
I dont get it, what exactly do you want to do with the entities? They should be always loaded.
I think this is what you are looking for: [url]http://wiki.garrysmod.com/page/ENTITY/UpdateTransmitState[/url]
[QUOTE=Benjiko99;40453481]I dont get it, what exactly do you want to do with the entities? They should be always loaded.[/QUOTE] When you join a game, on certain compiled maps, the entities will only load once you're in direct line of sight, then stay loaded into your game, to avoid the initial lag that you sometimes get with some maps when joining. [QUOTE=Robotboy655;40453550]I think this is what you are looking for: [url]http://wiki.garrysmod.com/page/ENTITY/UpdateTransmitState[/url][/QUOTE] Ah, that's exactly what I needed, thanks!
Sorry, you need to Log In to post a reply to this thread.