x


Application load advanced loading NO EXPERIENCE

what i want is a way to transfer my player to scene 2 - 3 - 4 fx, in scene 1 i have a house with 2 entrances, when player start he starts out there and can enter any of the 2 doors he want to, but! if i decide to go back outside i spawn at the "start of the new game" i want it to transfer the player to the outside infront of the door he just went though! please help me :(

more ▼

asked May 08 '10 at 03:51 PM

Rekaens gravatar image

Rekaens
54 7 10 14

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

I would use DontDestroyOnLoad(player) and just position your next level where the previous left off. Then when another level loads, Everything will be deleted except for the player, who will remain in the same position with everything identical to how it was before.

Just load the scene so that the door will line up with the position the player will be in when he passes through and you will be fine.

more ▼

answered May 08 '10 at 07:41 PM

Peter G gravatar image

Peter G
15k 16 44 136

thanks alot! that made alot more sense to me haha sorry for being so ignorant... :) but that really made sense thanks alot! :)

May 08 '10 at 09:16 PM Rekaens
(comments are locked)
10|3000 characters needed characters left

You will have to use Player Prefs. They are a way of saving data like health ammo or any other variable you can think of really. Used right this will help you transfer players to new scenes and stuff. It saves the data locally on the computer.

more ▼

answered May 08 '10 at 06:25 PM

KHopcraft gravatar image

KHopcraft
204 1 9

sounds like an odd way to do it - you can use static variables for that and skip on the serializing/deserializing with playerprefs

May 09 '10 at 02:15 AM Mike 3

Oh I see, thats cool.

May 09 '10 at 06:20 AM KHopcraft
(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:

x438
x437
x322
x22
x12

asked: May 08 '10 at 03:51 PM

Seen: 1405 times

Last Updated: May 08 '10 at 03:51 PM