Loading levels
by Nathan · in General Discussion · 03/17/2006 (5:54 pm) · 11 replies
I'm having some problems loading levels. What I want to do is simply load a level without creating a player or having the player control any object, I'm using the the starter.fps. But I can't figure out how to accomplish this. I can't get torque to load a level without creating a player. I would really appreciate it if somebody could show me how to do this.
#2
03/18/2006 (5:56 am)
I've been doing that. The problem is if I comment out %this.spawnPlayer(); so that the player won't load, the level doesn't load.
#3
03/18/2006 (7:50 am)
I still can't figure out how to load a level without creating a player. If I don't create the player, the level loading freezes right before it's done loading the objects.
#4
03/18/2006 (9:27 am)
It's because the client isn't getting assigned any control object. Just above where you commented out %this.spawnPlayer(), put in this:%this.camera.setTransform(pickSpawnPoint()); %this.setControlObject(%this.camera);
#5
03/18/2006 (10:30 am)
Thanks you, now it loads. But is there anyway to take control of the camera away from the player. I don't want the player to be able to control anything.
#6
03/18/2006 (10:37 am)
What _do_ you want the player to do? Use a different type of camera and/or hack out the camera from reading input from the move manager. Probably adding the advanced camera resource and setting the client to one of the static cameras would work.
#7
03/18/2006 (10:40 am)
I'm trying to just load a level where the client has control over nothing. I'm going to put the camera on a path, which won't work if the client has control over the camera.
#8
03/18/2006 (12:16 pm)
Errr, in client/default.binds.cs take out the movement commands.
#9
03/18/2006 (12:31 pm)
But the player still has control of the object. As in the camera won't follow a path because the player has control of it, even if he can't move it through the keyboard.
#10
Pathed Camera
03/18/2006 (6:44 pm)
I have done a path camera resource which sounds like just what you're looking for. The player starts as a camera which follows a path, you have no control over this pathed camera.Pathed Camera
#11
03/19/2006 (9:18 am)
Thanks Tim. The resource works great! I was under the impression if you set the player in control of the camera then it wouldn't follow a path. Thankfully I was wrong :)
Associate David Montgomery-Blake
David MontgomeryBlake
Look at the mission loading and mission cycling code. That will get you your basic "level loading" scheme. I'm not so sure about the player, though.