Game Development Community

What calls ShapeBase::pickup()?

by Daniel Smektala · in Torque Game Engine · 04/01/2008 (5:51 pm) · 2 replies

I have actually been programming for a long while and made 1 casual game already with C++/OpenGL from scratch. I have recently been messing with creating my own 3d engine, and I got to the point of loading milkshape meshes, and driving a car on a terrain using ODE physics.

Recently I bought the Torque 1.5.2 game engine. I think now I wasted quite alot of time mucking around making my own engine (though I have earned a great deal) now that I have messed around with torque.

Now to my small "issue". I am probably more experienced with programming then most people here, but I am feeling quite stupid because, for hours already I have been searching to figure out WHAT is calling ShapeBase::pickup();. There is NOTHING defined in the C++ source code for this function in the ShapeBase class, and there is no collision detection code that I can see that can lead to the calling of the ShapeBase::pickup() function.

From the "GettingStarted.pdf", you had to make a torquelogo shape and define a "onCollision()" function that gets called if something collides with the shape object. For the Shapebase::pickup() function, there is nothing defined in the C++ code that calls it since its purly defined in the script file. How the heck does the item know if something collided with it, and what calls the ShapeBase::pickup() function.

If you dont know already, I am talking about the starter.fps/server/scripts/inventory.cs file.


Thanks in advance.

About the author

Recent Threads


#1
04/01/2008 (6:39 pm)
www.garagegames.com/mg/forums/result.thread.php?qt=73703 Should shed some light on things.
#2
04/01/2008 (7:03 pm)
Ahhh. I see. The collision is handled in the player.cs. Should have thought of that, doh. Thanks very much ^_^