x


random spawn on level load

see im not a good scripter so i kinda need a script for my game if you could help me. im trying to make an online FPS game and i want to make it so that when the level starts that everyone that enters is spawned in a diffrent spot.

more ▼

asked May 17 '10 at 01:10 AM

user-2602 (google) gravatar image

user-2602 (google)
11 1 1 1

This is UnityAnswers, not UnityFreeScriptHelp. We won't code scripts for you, you need to take the time to learn how to do it yourself. If you have a specific question about scripting or a problem you're having, feel free to ask it here. But don't just say that you won't learn how to script and then ask us for a script for your game, that's not how it works. :P

May 17 '10 at 01:15 AM qJake

i said i wasnt good not "wont try"

May 17 '10 at 01:20 AM user-2602 (google)
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

I recommend that you have a gameobject in your scene that you call e.g. "Spawnpoints". Then you add several game objects under that game object, one for each spawn point. Then, when you player is to spawn, you find a random number to pick one of the spawn points. Be sure that this is done only on one of the computers (preferably the server) so that the player do not show up on different places on each computer. ;-)

more ▼

answered May 18 '10 at 06:05 PM

Ricky Helgesson gravatar image

Ricky Helgesson
59 1

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x440
x322

asked: May 17 '10 at 01:10 AM

Seen: 1393 times

Last Updated: May 17 '10 at 01:10 AM