Page 2 of 2

Re: Advanced/Customiseable Radar System

Posted: 19 Apr 2010, 15:39
by zwzsg
The engine does not read TDF anymore. The TDF are now parsed with Lua. See \base\maphelper.sdz\maphelper\parse_tdf.lua

But I'm not sure. :|

Re: Advanced/Customiseable Radar System

Posted: 20 Apr 2010, 01:02
by Argh
I don't understand. Do you need to read Unit data? If so, you need to read UnitDefs. What exactly do you need here?

Re: Advanced/Customiseable Radar System

Posted: 20 Apr 2010, 01:32
by skzedd
I needed to find out how the engine reads tdf files so I could make a reader for the sensor struct and class which i made. I did not find the reader in the C++ code so I was a little lost. But I found it thanks for the help.

Re: Advanced/Customiseable Radar System

Posted: 20 Apr 2010, 03:48
by bobthedinosaur
Be sure to add levels of stealth radar and jam.

Re: Advanced/Customiseable Radar System

Posted: 26 Apr 2010, 13:34
by skzedd
Why do I need to add stealth radar? There is an ignore array in the sugestion.

Re: Advanced/Customiseable Radar System

Posted: 28 Apr 2010, 03:40
by skzedd
Can someone expalin this http://pastebin.com/R7wCBWeE and how to get the spoter unit when the radar collosion occurs?

Re: Advanced/Customiseable Radar System

Posted: 28 Apr 2010, 12:01
by Argh
That... erm... it's a collection of Unit utility functions. You need to read radarHandler.cpp, IIRC. The "spotting" Unit ID would be the one performing the current set of passes, see main loop.

Re: Advanced/Customiseable Radar System

Posted: 28 Apr 2010, 15:07
by skzedd
You mean bool InRadar(const CUnit* unit, int allyTeam);? isn't that the detected unit?
Edit: If that is rtrue where is the enemy unit that is spoted?

Re: Advanced/Customiseable Radar System

Posted: 29 Apr 2010, 09:38
by Argh
Units don't trigger a Radar check per frame; a radar map is maintained per side. Unit IDs are only available, in terms of Radar, when they're created or moved. If you need to catch UnitIDs, so that you have "spotter" and "spottee"... you will need to write a new system. Spring assumes that we have exactly one type of Radar.