Advanced/Customiseable Radar System - Page 2

Advanced/Customiseable Radar System

Requests for features in the spring code.

Moderator: Moderators

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Advanced/Customiseable Radar System

Post 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. :|
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Advanced/Customiseable Radar System

Post 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?
User avatar
skzedd
Posts: 10
Joined: 06 Feb 2010, 14:28

Re: Advanced/Customiseable Radar System

Post 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.
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Re: Advanced/Customiseable Radar System

Post by bobthedinosaur »

Be sure to add levels of stealth radar and jam.
User avatar
skzedd
Posts: 10
Joined: 06 Feb 2010, 14:28

Re: Advanced/Customiseable Radar System

Post by skzedd »

Why do I need to add stealth radar? There is an ignore array in the sugestion.
User avatar
skzedd
Posts: 10
Joined: 06 Feb 2010, 14:28

Re: Advanced/Customiseable Radar System

Post by skzedd »

Can someone expalin this http://pastebin.com/R7wCBWeE and how to get the spoter unit when the radar collosion occurs?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Advanced/Customiseable Radar System

Post 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.
User avatar
skzedd
Posts: 10
Joined: 06 Feb 2010, 14:28

Re: Advanced/Customiseable Radar System

Post 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?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Advanced/Customiseable Radar System

Post 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.
Post Reply

Return to “Feature Requests”