Crash load datablock
by Dany · in Torque 3D Professional · 06/19/2011 (2:18 am) · 6 replies
Hello,
I try different Datablock.
on World editor I modify the settings of spawnsphere
I set Spawnclass to "AIPLAYER" and spawndatablock to "aviondata"
I create a datablock "avion.cs" with this code
datablock FlyingVehicleData(aviondata)
{
shapeFile = "art/shapes/avion.dts";
boundingBox = "1 1 1";
};
the datablockexec contain my datablock avion.cs
but if I start the project I obtain this error from torsion console:
Mapping string: MissionStartPhase3Ack to index: 2
GameBase::setDatablockProperty - Could not find data block "aviondata"
ShapeBase::onAdd - no datablock on shape 4177:AIPlayer ((null))
If I set PlayerData instead of Flyingvehicledata It Works
where is my error ?
I try different Datablock.
on World editor I modify the settings of spawnsphere
I set Spawnclass to "AIPLAYER" and spawndatablock to "aviondata"
I create a datablock "avion.cs" with this code
datablock FlyingVehicleData(aviondata)
{
shapeFile = "art/shapes/avion.dts";
boundingBox = "1 1 1";
};
the datablockexec contain my datablock avion.cs
but if I start the project I obtain this error from torsion console:
Mapping string: MissionStartPhase3Ack to index: 2
GameBase::setDatablockProperty - Could not find data block "aviondata"
ShapeBase::onAdd - no datablock on shape 4177:AIPlayer ((null))
If I set PlayerData instead of Flyingvehicledata It Works
where is my error ?
About the author
#2
06/21/2011 (11:32 am)
Why are you trying to spawn Flyingvehicledata value as an AI?
#3
there are many method in AIplayer (movetonode,movenextnode,...)
Actually I want to spawn an plane but in the air and move only if I click on terrain (like RTS)
I try to use Vehicledata instead of aiplayer but no more result
Dany
06/21/2011 (11:48 pm)
I am New with torque script, and there are many method in AIplayer (movetonode,movenextnode,...)
Actually I want to spawn an plane but in the air and move only if I click on terrain (like RTS)
I try to use Vehicledata instead of aiplayer but no more result
Dany
#4
If you want a Vehicle with wheels, you have to use the datablock-type WheeledVehicleData.
If you want a Camera, you have to use the datablock-type CameraData.
... and so on...
06/22/2011 (12:51 am)
You can not mix every type of object with every type of datablock. If you want a Player (or a AIPlayer), you have to use the datablock-type PlayerData.If you want a Vehicle with wheels, you have to use the datablock-type WheeledVehicleData.
If you want a Camera, you have to use the datablock-type CameraData.
... and so on...
#5
but If I test with Flyingvehicledata that doesnt work
I think there are no crash but no object are created
I test this evening and i repost after
thanks
Dany
06/22/2011 (3:00 am)
Ok I understand,but If I test with Flyingvehicledata that doesnt work
I think there are no crash but no object are created
I test this evening and i repost after
thanks
Dany
Torque 3D Owner Dany
No one to help Me
the problem is too hard for all of us ?
I try other way but same problem.
defaultbind contains:
function spawnAI(%val)
{
// If key was pressed down
if(%val)
{
// Create a new, generic AI Player
// Position will be at the camera's location
// Datablock will determine the type of actor
new AIPlayer()
{
position = LocalClientConnection.camera.getPosition();
datablock = "aviondata";
};
}
}
avion.cs contains :
datablock FlyingVehicleData(aviondata)
{
shapeFile = "art/shapes/avion.dts";
boundingBox = "1 1 1";
};
when a press the key to execute spawnai
the program crash. in log the error is the same on my previous message
with playerdata its works Why ?
please help me to understand
Dany