Datablock tutorial/manual
by vanni bisella · in Torque 3D Beginner · 01/21/2015 (8:38 am) · 2 replies
Hello everyone
I'm new here. I'm learning to use torque3d. Can you tell me where i can find manual or tutorial step by step on how to create data block and apply them to 3D objects that I created?
thank you
I'm new here. I'm learning to use torque3d. Can you tell me where i can find manual or tutorial step by step on how to create data block and apply them to 3D objects that I created?
thank you
Torque Owner Richard Ranft
Roostertail Games
For instance - create a project from the Full template. Then look in game/art/datablocks/player.cs. This file contains all of the datablocks for a player.
A Player and an AIPlayer share the same datablock, so to create an AIPlayer, you'd do something like this:
%player = new AiPlayer() { dataBlock = DemoPlayer; // DemoPlayer is the default AI Player datablock };The same basic pattern applies to all other objects - you assign the datablock at creation. Creating each datablock is different based on the type of datablock you need - find examples throughout the Full Template.