[Tutorial] Simple Spawn Protection
#4

Quote:
Originally Posted by Infinity
View Post
I don't particularly agree with the method of spawn protection (spawning them in a virtual world), but that's just up to preferences.

What I do deem wrong, however, is that you use a random number generator to decide which virtual world the player is sent off to. Random numbers are not guaranteed unique, meaning multiple players could end up in the same virtual world, which is obviously not what you want. A simpler and guaranteed unique number would be to simply use the player's ID.
I agree, eventhough it's a 1/40 chance you will end up in the same VW, you shouldn't take the risk. You could like Infinity said use the player's ID. Also, you should use a more general type of spawn protection, i.e. setting their health to a high value at each update or use a timer to save resources.
Other than that, good tutorial and nice effort
Reply


Messages In This Thread
Simple Spawn Protection - by Youssef221 - 26.06.2015, 08:43
Re: Simple Spawn Protection - by Infinity - 26.06.2015, 08:59
Re: Simple Spawn Protection - by Youssef221 - 26.06.2015, 09:02
Re: Simple Spawn Protection - by Sellize - 26.06.2015, 09:02
Re: Simple Spawn Protection - by Youssef221 - 26.06.2015, 09:05
Re: Simple Spawn Protection - by Sellize - 26.06.2015, 09:08
Re: Simple Spawn Protection - by Youssef221 - 26.06.2015, 09:22
Re: Simple Spawn Protection - by Sellize - 26.06.2015, 09:26
Re: Simple Spawn Protection - by Youssef221 - 26.06.2015, 09:29

Forum Jump:


Users browsing this thread: 3 Guest(s)