Homing Missiles
by Martin Schultz · in Torque Game Engine · 10/29/2002 (4:03 am) · 43 replies
Hi there,
did anyone get homing missiles working? Script oder C++ based? Any experience would be great :)
Thanks in advance,
Martin
did anyone get homing missiles working? Script oder C++ based? Any experience would be great :)
Thanks in advance,
Martin
#22
11/07/2002 (10:44 am)
Whats odd is none of this works, for me at least.. I can set a target manually and it will lock and track. But just sitting there pointing at vehicle with a heat of 1.0 does nothing, I dont even get the crosshairGui change. I have version 1_1_2 without any head upgrades. Will this work for me?
#23
I only tried it so far with the latest head, but I can't see why it shouldn't work with a 1.1.2 version. There are no relevant changes AFAIK between HEAD and 1.1.2 which could affect the function of the homing stuff.
The only thing I could recommand is: Go again step by step through Luigi's tutorial and then incorporate all the changes written above. And: You have to be very careful when changing the code (mistakes are coming in easy with this homing stuff!). The first time I tried it I made some mistakes, but starting over with a clean HEAD and carefully reading it over and over I got it working. If you want, I can sent you the modified files of my head release just to see maybe where the difference to your one is. Would that help maybe? Just tell me the files you need!
Luigi, are you wrapping up all this stuff up and post it as a GG resource? Would be cool. :-)
Best,
Martin
11/07/2002 (11:48 am)
Hi,Quote:
Whats odd is none of this works, for me at least.. I can set a target manually and it will lock and track. But just sitting there pointing at vehicle with a heat of 1.0 does nothing, I dont even get the crosshairGui change. I have version 1_1_2 without any head upgrades. Will this work for me?
I only tried it so far with the latest head, but I can't see why it shouldn't work with a 1.1.2 version. There are no relevant changes AFAIK between HEAD and 1.1.2 which could affect the function of the homing stuff.
The only thing I could recommand is: Go again step by step through Luigi's tutorial and then incorporate all the changes written above. And: You have to be very careful when changing the code (mistakes are coming in easy with this homing stuff!). The first time I tried it I made some mistakes, but starting over with a clean HEAD and carefully reading it over and over I got it working. If you want, I can sent you the modified files of my head release just to see maybe where the difference to your one is. Would that help maybe? Just tell me the files you need!
Luigi, are you wrapping up all this stuff up and post it as a GG resource? Would be cool. :-)
Best,
Martin
#24
11/07/2002 (12:03 pm)
Sam I mean getHeat and all that stuff is posted
#25
Unfortunately I'm really stacked with work up to mid November so it won't be up before then.
11/07/2002 (12:23 pm)
I definitely will be wrapping it up as soon as I have some time to dedicate to it (I also have some new things like T2 forcefields, T2 turrets, T2 jetpacks, and an MFC admin client to convert to tutorials).Unfortunately I'm really stacked with work up to mid November so it won't be up before then.
#26
11/07/2002 (3:07 pm)
I was the one askin about the turrets on your web site, I wouldnt be able to convince you to start there could I? :P
#27
11/08/2002 (10:44 am)
I second Sam's request for Turrets, heck I'll be happy to convert anything u got to work with the HEAD version
#28
Is this where this needs to be?
11/09/2002 (5:07 pm)
Ok Ive been through it 3 times and still nothing, everything is where it should be. There is however a question on wheather or not I have this function in the right place, take a look and let me know..in ShapeBase.cc in the RenderObject function: I have..
ShapeImageRenderImage* shiri = dynamic_cast<ShapeImageRenderImage*>(image);
if (shiri != NULL)
{
renderMountedImage(state, shiri);
MountedImage* mimage = getImageStruct(shiri->mIndex);
if((bool)mimage->lockTarget)
{
renderTargetHUD(state, mimage);
}
}
else
{
renderImage(state, image);
}Is this where this needs to be?
#29
audio/audio.cc: In function 'ALuint alxGetWaveLen(unsigned int)':
audio/audio.cc:1458: warning: return to 'ALuint' from 'F64'
audio/audio.cc:1458: warning: argument to 'unsigned int' from 'F64'
Anyone know what in the homming missile code is refering to Audio.cc ?
Thanks for any help on this
Gilles Jr
[edit] Oupss, it's coming from an error in my shapebase.h (I think). I probably made a mistake somewhere.
01/06/2003 (8:15 am)
hmmm, weird :) I followed Luigi tut and then this thread. When I finally been able to compile all with the fix, a sudden error came but from AUDIO.CC that I didn't even touch for this and that was compiling no prob before ?!? All the modified files for the Homing missiles are compiling. Here is the error :audio/audio.cc: In function 'ALuint alxGetWaveLen(unsigned int)':
audio/audio.cc:1458: warning: return to 'ALuint' from 'F64'
audio/audio.cc:1458: warning: argument to 'unsigned int' from 'F64'
Anyone know what in the homming missile code is refering to Audio.cc ?
Thanks for any help on this
Gilles Jr
[edit] Oupss, it's coming from an error in my shapebase.h (I think). I probably made a mistake somewhere.
#30
01/07/2003 (1:09 pm)
I suspect you've been defining things in the wrong order in the shapebase.h file. I had the same problem, and audio.cc throws the error only because it's kinda the first one to include this header file.
#31
01/07/2003 (11:59 pm)
Has anyone put all the new code together in to one tut?
#32
01/08/2003 (5:26 am)
Thanks for the info Josef. Luigi's tut is really confusing on where to include things (for a 3D artist). I will retry to do all again.
#33
I know it is probably a code that I put in a wrong spot, but can't figure it. Thanks for any help or hint.
01/22/2003 (7:09 pm)
Well, can't get it to compile :( I had put it on hold then I retryed today. I now have the following error that I'm not able to solve. I need help please, if possible :)game/shapeBase.cc: At global scope: game/shapeBase.cc:2223: no 'void ShapeBase::renderTargetHUD(SceneState*, ShapeBase::MountedImage*)' member function declared in class 'ShapeBase' game/shapeBase.cc: In member function 'virtual void ShapeBase::renderObject(SceneState*, SceneRenderImage*)': game/shapeBase.cc:2387: 'renderTargetHUD' undeclared (first use this function) game/shapeBase.cc: In function 'S32 cGetLockedTarget(SimObject*, int, const char**)': game/shapeBase.cc:4358: no matching function for call to 'ShapeBase:: getLockedTarget(int)' make[1]: *** [out.GCC3.RELEASE/game/shapeBase.obj] Error 1 make: *** [default] Error 2
I know it is probably a code that I put in a wrong spot, but can't figure it. Thanks for any help or hint.
#34
Has anyone noticed that running this in a dedicated server will crash it?
I've noticed that this crash can be avoided if you comment out the 'lockReticle' and 'seekReticle' in the ShapeBaseImageData datablock.
So, there's obviously something wrong with the way the reticles are handled in the engine.
Has anyone else had this problem? or is it just me?
note: everything works perfectly when i host a game or if i play a singleplayer game. It just crashes the dedicated server. If i comment out the reticles in the datablock, it works fine in a dedicated server, but there are no reticles for the players.
Does anyone have a fix for this?
Thanks,
Mike
01/30/2003 (4:11 pm)
Hey,Has anyone noticed that running this in a dedicated server will crash it?
I've noticed that this crash can be avoided if you comment out the 'lockReticle' and 'seekReticle' in the ShapeBaseImageData datablock.
So, there's obviously something wrong with the way the reticles are handled in the engine.
Has anyone else had this problem? or is it just me?
note: everything works perfectly when i host a game or if i play a singleplayer game. It just crashes the dedicated server. If i comment out the reticles in the datablock, it works fine in a dedicated server, but there are no reticles for the players.
Does anyone have a fix for this?
Thanks,
Mike
#35
01/30/2003 (8:57 pm)
The problem is that the Dedicated server doesn't load any of the GUI routines. So if you're calling them for some reason the system will crash.
#36
Yea, I did a little investigating last night and found that commenting out this code will stop the server from crashing.
However, the reticles no longer show up for the client. So i've just gotta figure out a way to fix this new problem.
Mike
01/31/2003 (8:56 am)
Hi,Yea, I did a little investigating last night and found that commenting out this code will stop the server from crashing.
//initalize textures for Missile_launcher Hud if(lockReticleName && lockReticleName[0] != ´[[62815f4051a56]]´)lockReticleTexture.set(lockReticleName); if(seekReticleName && seekReticleName[0] != ´'[[62815f4051a56]]´)seekReticleTexture.set(seekReticleName);
However, the reticles no longer show up for the client. So i've just gotta figure out a way to fix this new problem.
Mike
#37
02/04/2003 (7:42 am)
Anyone got a bead on this client thing? Having trouble tracking it down...
#38
That's the idiom you need - wrap your graphics-loading calls with that, and you should be ok. I believe it comes from GameBase.
It returns true if you're running on a client.
02/04/2003 (6:57 pm)
Here we go: if(isClientObject())That's the idiom you need - wrap your graphics-loading calls with that, and you should be ok. I believe it comes from GameBase.
It returns true if you're running on a client.
#39
02/20/2003 (6:05 am)
Anyone got these reticles to work? The missile is tracking right but the reticles dont't show up.
#40
05/25/2003 (12:32 pm)
Ben that stopped the client's locking icon from rendering on the host but won't make the client's locking icon show up, though it is locked
Torque 3D Owner Luigi Rosso
Our current hosts have been very unreliable and a couple tech support individuals have been totally unpleasant.
You should be able to access the site here:
http://www.realityslip.com/cirrus