Building ".CC" and ".H" file for torque
by Matthew Jones · in Torque Game Engine · 06/24/2002 (8:24 pm) · 8 replies
I have not found any documentation on how to set these files up and link to the project(in the code). What are the hooks in the code? What is required?
I have an AI system from a previos engine that was built for another project and I would like to try to plug it into Torque. I have no clue as to how to make it Torque compatible and my programmers are a little lost about the subject also.
If there is any documentation or you can offer me some advice I would really be greatful. Depending on how it works out it might make a great plugin for the community.
Its basically a waypoint system that allows for multiple paths and various behaviors for NPC's.
Any help or reference would be appriciated
Thanks
Matt
I have an AI system from a previos engine that was built for another project and I would like to try to plug it into Torque. I have no clue as to how to make it Torque compatible and my programmers are a little lost about the subject also.
If there is any documentation or you can offer me some advice I would really be greatful. Depending on how it works out it might make a great plugin for the community.
Its basically a waypoint system that allows for multiple paths and various behaviors for NPC's.
Any help or reference would be appriciated
Thanks
Matt
#2
My question is there any rules to follow to be in accordance with the torque engine or are you free to build your own set of things and then plug them in as script to use by the Torque engine.
Say I wanted to make a series of events(for npc's) I would just have to write the code in C++ and give them references in the torque script. Then figure a way to add them to the mission editor gui.
Or is there some systematic proccess in which my C++ code would have to be wrote to make it campatible with the torque scripting.
Maybe I am asking in the wrong place.
Any more reference even third party would be helpful.
Matt
06/25/2002 (1:22 pm)
I can set up torque in fact I already have. My question is there any rules to follow to be in accordance with the torque engine or are you free to build your own set of things and then plug them in as script to use by the Torque engine.
Say I wanted to make a series of events(for npc's) I would just have to write the code in C++ and give them references in the torque script. Then figure a way to add them to the mission editor gui.
Or is there some systematic proccess in which my C++ code would have to be wrote to make it campatible with the torque scripting.
Maybe I am asking in the wrong place.
Any more reference even third party would be helpful.
Matt
#3
You have to derive from specific classes, you have to implement specific methods, etc. A good start would be to read this...
EDIT: Or, take almost any C++ code snippit released here and see how others did it...
06/25/2002 (1:31 pm)
Well, of course you have to do it "the Torque way" to make your classes accessible from script...You have to derive from specific classes, you have to implement specific methods, etc. A good start would be to read this...
EDIT: Or, take almost any C++ code snippit released here and see how others did it...
#4
The best way I can think of advising you without saturating you with too much detail is to read the following link and try to understand it as best you can.
Coding the Console
If you can understand this it should give you an idea of how to 'plug' your stuff into the torque scripting side of things.
One thing to keep in mind that the term 'console' that is passed around is essentially a conduit for the scripts. By this I mean that if you create console objects (classes based upon the 'ConObject' class) you will inherit all the facilities needed to exposed your functions/variable members to the scripts and vice-versa.
Have a look anyway and come back with some more questions when you are ready.
All the best,
- Melv.
06/25/2002 (1:33 pm)
Hi Matthew,The best way I can think of advising you without saturating you with too much detail is to read the following link and try to understand it as best you can.
Coding the Console
If you can understand this it should give you an idea of how to 'plug' your stuff into the torque scripting side of things.
One thing to keep in mind that the term 'console' that is passed around is essentially a conduit for the scripts. By this I mean that if you create console objects (classes based upon the 'ConObject' class) you will inherit all the facilities needed to exposed your functions/variable members to the scripts and vice-versa.
Have a look anyway and come back with some more questions when you are ready.
All the best,
- Melv.
#5
06/25/2002 (1:35 pm)
Hehe, I was faster, Melv... ;-))
#7
Thanks to all
Matt
06/25/2002 (1:41 pm)
Yep thats what I was looking for. Its funny in about it took about 10 minutes to get the info. I love this place. Thanks to all
Matt
Associate James Lupiani
Sickhead Games