Game Development Community

ShapeBaseImageData error

by John Cooney · in Torque Game Engine · 12/30/2004 (9:57 am) · 13 replies

Hello, I get the following error in Torque when I try to add an object to my scene:

"Unable to find function ShapeBaseImageData::create"

-and nothing shows up in the scene. Any thoughts as to what this error means?

If I make the object part of a Static Shape datablock it shows up but in actually this should be mounted to my vehicle, and it only mounts correctly when I make it part of a ShapeBaseImageData datablock.

#1
01/01/2005 (3:40 am)
I am not sure if you can add ShapeBaseImages directly to a scene.

Check out the item stuff in the sample applications.
Normally you declare a new datablock for your ShapeImage e.g ShapeBaseImageData and in an instance of a normal datablock e.g. ItemData you assign your ShapeBaseImageData to the image field.

As long as your object is not picked up or mounted the engine renders the item. When it is picked up or mounted, the image is rendered.

-- Markus
#2
01/01/2005 (2:27 pm)
ShapeBaseImages are designed to be part of ShapeBases. You can't create one on its own.
#3
01/03/2005 (7:29 am)
Hmm, the mounted object mounts okay as a ShapeBaseImageDatablock. And each mounted object has its own datablock. But I'm not sure what you mean by assigning my ShapeBaseImageDatablock to an instance of my normal datablock.
#4
01/03/2005 (7:58 am)
Basically, I want to damage specific parts of a vehicle. I want to accomplish this by mounting the doors, bumpers, etc as separate objects on my vehicle. The problem I have is trying to detect collisions on the individual mounted object so that I can apply effects to the mounted objects and trigger animation threads. I've defined onCollision functions for the mounted images but they're not getting triggered. Any ideas on how best to accomplish.
#5
01/03/2005 (8:08 am)
Mounted images do not have collision

I'm not sure, but this might help

www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3257


this might help also... seeing how the turret mounts to vehicles

www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5345
#6
01/03/2005 (8:57 am)
Thanks, although those links aren't really what I had in mind. I'm trying to develop a method where a parts of a vehicle can detect collision and then subsequently trigger animation effects and more damaged parts of that vehicle (i.e. doors and bumpers ).
#7
01/04/2005 (5:12 am)
As you found in this thread
www.garagegames.com/mg/forums/result.thread.php?qt=22178
you should be able to use staticShape
#8
01/04/2005 (8:03 am)
I've tries out the above thread, and I haven't been able to mount a StaticShape onto my vehicle. I changed the name of the datablock for the mountable object to StaticShapeData and I specified " %obj.mountObject(%name,1); " in my vehicle file so that the door mounts to the vehicle.
#9
03/23/2005 (6:32 am)
While we are on the subject, how do you call a script method on ShapeBaseImageData ?

datablock ShapeBaseImageData(PdaImage)
{
...// bla
}

function PdaImage::use(%this, %obj, %client)
{
....// bla
}

This fails because it cant find the function "use"...........why?

PdaImage.use(%obj,%client);
#10
04/02/2005 (1:45 pm)
Is that how your code is exactly laid out? Are you sure that PdaImage is pointing to the right object?
#11
04/02/2005 (6:05 pm)
Yes, it PdaImage is valid, I can target it and it returns the correct number.
#12
04/02/2005 (11:31 pm)
What happens when you call dump() on PdaImage?
#13
04/03/2005 (6:57 am)
Unfortunately that was too many code changes ago, I did it a different way to get it working. Seems it should be able to find a function given the object but it's been so long since I had the problem I can't remember. Thanks for your reply.