Hard Light Productions Forums

Modding, Mission Design, and Coding => The Scripting Workshop => Topic started by: Black Wolf on October 24, 2012, 02:42:29 am

Title: Top Down Radar
Post by: Black Wolf on October 24, 2012, 02:42:29 am
Playing around with terrain missions some more, I've currently got a working mission that could really use a top down radar. Most of my previous missions have been basically the same as regular FS missions, with dogfighting and such, but this one is more like a maze, and top down makes more sense. Does anyone have anything that might be applicable? Preferbly something I can turn on and off with sexps, so the player can switch back to the normal radar if dogfighting does break out? I thought of a way to do it with the cutscene sexps, but it's massively intensive, and the image subtitle sexpos are being rather prickish for some reason, and not doing what they're told.

It's no massive deal if not, but it'd be cool. Ta in advance.
Title: Re: Top Down Radar
Post by: headdie on October 24, 2012, 05:43:54 am
have you tried using the cinematic camera controls to move the player's PoV to a position high above the terrain for the "map" mode?
Title: Re: Top Down Radar
Post by: Black Wolf on October 24, 2012, 07:21:08 am
That's not really what I want, I was hoping to replace the normal radar with a similar type of gauge, just from above, rather than from the player's perspective. At the moment, all the buildings are on the same plane, so you get a line of red dots - not very useful.
Title: Re: Top Down Radar
Post by: Solatar on October 24, 2012, 07:50:27 am
This isn't quite what you're looking for, but it may be a start:
http://www.hard-light.net/forums/index.php?topic=57750.msg1164761#msg1164761

I don't know if that's current, or if it still works, but when you press a key it pops up a "top down" map.
Title: Re: Top Down Radar
Post by: Admiral MS on October 24, 2012, 10:30:55 am
I use a slightly modified version of the radar from the old RTS mod like the one in the screens http://www.hard-light.net/forums/index.php?topic=81590.msg1626994#msg1626994
It's top down view and can also be displayed during normal gameplay somewhere on the HUD. If you have special icons for the walls they could be displayed on the radar.
Title: Re: Top Down Radar
Post by: Black Wolf on October 24, 2012, 10:53:41 am
That would be ideal, if it's easily extractable from the rest of the RTS stuff. Can the range be set to something other than infinite? There aren't any walls, exactly, you've got to find a way through a sensor grid, but I'd like to keep the range down so the player actually has to explore, rather than just looking for gaps in the "minimap".

Still, even if the range isn't settabe, it'd be a damned sight better than the one I've got now! :D
Title: Re: Top Down Radar
Post by: Admiral MS on October 24, 2012, 11:11:46 am
It can be easily modified so the centerpoint is the player and only things up to a certain range are appearing on it. What it can't do at the moment is rotate the view when the player is turning (instead player or camera orientation is indicated by lines) and adding that would require another load of vector math I don't want to think about ;)
Title: Re: Top Down Radar
Post by: Nuke on October 24, 2012, 01:41:51 pm
my cockpit system has an assortment of scripted radars. just pull it off my svn and it shouldnt be to hard to port to whatever you are using. you probibly want my elite style radar.
Title: Re: Top Down Radar
Post by: Black Wolf on October 25, 2012, 11:15:04 am
It can be easily modified so the centerpoint is the player and only things up to a certain range are appearing on it. What it can't do at the moment is rotate the view when the player is turning (instead player or camera orientation is indicated by lines) and adding that would require another load of vector math I don't want to think about ;)

That would be ideal. Rotating with the player isn't really a problem, that's a toggleable preference when you're using stuff like GPS anyway - in this case, I'm perfectly happy to just take the preference settings out of the player's hands. :D

my cockpit system has an assortment of scripted radars. just pull it off my svn and it shouldnt be to hard to port to whatever you are using. you probibly want my elite style radar.

I'm pretty sure I've found the right part of the script, but I honestly have no idea how to integrate it into my data structure... and for that matter, only the very vaguest idea how to turn it on in game (I think I need scipt_eval "pradar,Alpha3,something,something,something"?). Scripting is a dark art to me I'm afraid.
Title: Re: Top Down Radar
Post by: Nuke on October 25, 2012, 02:50:41 pm
thats the problem with all my scripted features, there more or less combined into one or two megascripts that are hard for beginners to extract the parts they want. give me a bit and il post a gutted version for freders.
Title: Re: Top Down Radar
Post by: Nuke on October 25, 2012, 07:13:25 pm
here you go (https://docs.google.com/open?id=0B0xTBHKy0hAAdHRINVd3QmJCQzA)

see the top of the scripting table and the included mission for usage. you can also replace the bitmaps if you want. report bugs here pls.

this includes all four radar modes from the cockpit demo, you want mode 2.