Game Development Community

Player datablock error, levels

by Lars Nilsson · in Torque 3D Beginner · 03/06/2014 (3:50 am) · 13 replies

Hello,

Started up the game generated by the Torque3D Project Manager today and I was told that it couldn't find datablock "DefaultPlayerData". So I tried creating the player datablock in the Datablock Editor and it worked fine and well. I deleted the standard Spawn Point, and added a new "Player Spawn Point" and used class Player, along with my newly created Player Datablock instead.

Still cannot get the player camera working. Somehow I did for a slight second yesterday.

Also the short time I got it working I got some more problems. First one was with materials, I read on that this was a common issue when material names was similar. Renamed in Blender, worked! But then I added some models in my levels, saved the level and opened it up later on again. This time it was looking like before I started working on the level. Sad, I spent a good 30 mins setting the level up.

Don't know what that last thing was. But first and foremost, what's up with the Player datablock? It works with full template, but I want to start from scratch, with Empty Project.

Thanks, and sorry for long post.

#1
03/06/2014 (7:04 am)
I'm amazed that works - normally if you create an object that has the same name as an exposed engine class it craps the bed. On that note, the Empty Template does not define the DefaultPlayerData datablock - it's empty....

So if you want bits from the Full Template you'll have to find out what they are and where they live and copy them over.
#2
03/06/2014 (7:12 am)
Oh thanks, there is not some template built for this with an Empty game, only with a Player class? Last time I used Torque3D, about a year ago, it worked fine out of the box.

Also, any idea if I am doing something wrong when levels wont save properly?

And slightly offtopic, but making a game in Torque3D, can you stick to Torque Script? Or do you need to do some stuff in C/C++?
#3
03/06/2014 (8:16 pm)
1) Don't think so - they really cleaned it out to be a "bare bones" empty project.

2) Not sure why levels wouldn't be saving correctly - I don't think any real changes were made to the editor scripts or engine-side objects.

3) That depends on what you are going to do in your game. You can do a ton of stuff just with Torquescript, but some things (like adding new object types) will have to be done in the engine. You'll have to start designing your game and get a feel for what you need before anyone can help you with that question.
#4
03/07/2014 (2:40 am)
Oh okay, that leads me in to the other question I have. But I posted it in another thread. Really want to get some basic physics going, but don't really know how to add physics to a simple object, like a cube.
#5
03/07/2014 (6:18 am)
Add a RigidShape object from the Library and select the shapefile you want. If it has a collision shape on it then that will be used, otherwise you can have it use default cube or sphere collision shapes.
#6
03/07/2014 (6:18 am)
Oops. Double post...
#7
03/07/2014 (6:59 am)
Do you mean the RigidShapeData in the Datablock editor? Cannot find the RigidShape in the object editor library.
#8
03/07/2014 (8:53 am)
I guess I really meant a BouncingBoulder object from Library/Scripted/RigidShape. You can then use the model datablock to create a new one with a different shapefile that points to what you want.
#9
03/07/2014 (8:58 am)
I do not have the RigidShape script oddly enough. Well, if it's only the script and not any additional resources, is there a way to find it? Havent set myself in to TorqueScript just yet.
#10
03/07/2014 (9:19 am)
Empty template is empty....
#11
03/07/2014 (9:30 am)
Oh well, I am using the Full Template now and cannot find the RigidShape script.
#13
03/07/2014 (10:53 am)
Yes, but I found out the problem now, I think. My "rigidShape.cs" class was empty, copied the code from the "FPS-Tutorial" on GitHub and now it appears as it should. Thanks!

Sidenote, do you need Physx for more advanced physics, like turning a lever or something? Another thing, how can you use input with physics, say I like to move this box with my mouse? Sorry, I just think it is better to ask here than starting thread after thread about small questions like these. :-)

EDIT: Game crashes when trying to add "RigidShape" object. Found out it only wants .dts files. Will try converting my mesh now. Same result when using cached .dts mesh, but it was worth a try at least. Can anyone provide working dae2dts converter?

Thansk again!