Jump to content
The Dark Mod Forums
Sign in to follow this  
kingsal

TDM security cameras

Recommended Posts

Hello everyone, I've been thinking about messing around with the new security cameras and had a few questions that people might have answers too. I know these are a WIP feature.

 

- Currently, the camera stops in place once it locates the player. Is it possible to append the script to have it follow the player's movement (similar to the t2 cameras)? I'd want to be able to set its max "follow" speed as well.

 

- Is there a way to adjust its visual acuity similar to the AI?

 

Obviously I'd want to do this stuff without messing the the source so it would have to be appended to the object script.

 

It would be wonderful to hack those things in if possible.

 

 

Thanks!

 

Share this post


Link to post
Share on other sites

Follow the player: No.

 

Acuity adjustment: No.

 

You could add these feature requests to issue #4731.

Share this post


Link to post
Share on other sites

I would prefer this implemented as spawnargs rather than scripts for performance sake.

Share this post


Link to post
Share on other sites

Cool. It would be great if they have the function to follow the player to create that tense moment of escaping its view. Otherwise it will alert and the player can just take half a step out of its view and avoid having to get away.

 

Thanks for the info. I'll add a note in the bugtracker.

Edited by kingsal

Share this post


Link to post
Share on other sites

I don't know what features we already have but I would also like to see some kind of alarm indicator (LED-like on the camera body)

  • green - no detection
  • yellow - camera suspicious, follows player movementt (?)
  • red - triggers alarm (give player a second or two to put it out with a fire arrow?)

Share this post


Link to post
Share on other sites

That would be great!

 

If I remember correctly in T2 the spot light color changes?

 

So the camera could have something like: searching_color, detected_color, and alarm_color spawnargs available to authors. This could effect the spot light and also the light textures on the model. Bonus if it can also change color on any effects like a lens flare glow attached to it.

Share this post


Link to post
Share on other sites

In regards to following the player, is it not possible to make a change to this script? http://forums.thedarkmod.com/topic/14394-apples-and-peaches-obsttortes-mapping-and-scripting-thread/page-16?do=findComment&comment=396357

 

The script for that looks like this:

object statue_look
{
	void init();
	void loopLook();
	vector viewDir;
	vector direction;
	float cosine;
	float tolerance;
};
void statue_look::init()
{
	thread loopLook();
}
void statue_look::loopLook()
{
	while(1)
	{
		if (distanceTo($player1)<1024)
		{
			viewDir=sys.angToForward($player1.getViewAngles());
			direction=getOrigin()-$player1.getOrigin();
			cosine=viewDir*direction/sys.vecLength(direction);
			direction_z=0;
			if (cosine<sys.cos($player1.getFov()/2+30))
			{
				setAngles(sys.VecToAngles(-direction)+'0 90 0');
			}
		}
		sys.waitFrame();
	}
	
}

If you remove the "if (cosine<sys.cos($player1.getFov()/2+30))" bit and it's associated brackets those statues now follow the player (it does bring up some smoothing problems but that's another thing).

 

Couldn't you trigger that in the security camera script so that if it spots the player it will activate that follow the player script for a duration until the player has been out of sight for X amount of seconds?

Share this post


Link to post
Share on other sites

 

I don't know what features we already have but I would also like to see some kind of alarm indicator (LED-like on the camera body)

  • green - no detection
  • yellow - camera suspicious, follows player movementt (?)
  • red - triggers alarm (give player a second or two to put it out with a fire arrow?)

 

I think this has code support already: I haven't confirmed it works but you can see a shaderparm being updated in idSecurityCamera::SetAlertMode(). It needs a material on the camera model to use that shaderparm though, and as far as I know neither the current (Biker's?) model nor Epifire's new one has that, probably because it isn't a documented feature.


Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...