But I'm not sure.
Advanced/Customiseable Radar System
Moderator: Moderators
Re: Advanced/Customiseable Radar System
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.
But I'm not sure.
Re: Advanced/Customiseable Radar System
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
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.
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: Advanced/Customiseable Radar System
Be sure to add levels of stealth radar and jam.
Re: Advanced/Customiseable Radar System
Why do I need to add stealth radar? There is an ignore array in the sugestion.
Re: Advanced/Customiseable Radar System
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
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
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?
Edit: If that is rtrue where is the enemy unit that is spoted?
Re: Advanced/Customiseable Radar System
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.
