generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Need help with a scripting question.

Previous Thread :: Next Thread 
EcIiptic is not online. EcIiptic
Joined: 12 Aug 2009
Total Posts: 13737
11 May 2014 12:31 PM
Okay. For what I want to make on my game, I need this:

A brick that has a script in it that prints "Someone is looking" when a camera can see the block.


Can someone share a link to the wiki for a guide on that, or simply tell me the event or what.

#Piano
Report Abuse
ColdSmoke is not online. ColdSmoke
Joined: 02 Jan 2012
Total Posts: 5784
11 May 2014 12:33 PM
there isnt an event for that

I'm pretty sure you would need to do some raycasting and stuff, but no way to tell whats on screen, unless you want to check if that person is in the direct center of the screen you could draw a ray using the lookvector of the camera
Report Abuse
TehIcyStar is not online. TehIcyStar
Joined: 07 Mar 2010
Total Posts: 1649
11 May 2014 12:33 PM
I barely even touched camera in Lua, but my best guess is to use camera's .Focus property.

http://wiki.roblox.com/index.php/Camera_manipulation
Report Abuse
EcIiptic is not online. EcIiptic
Joined: 12 Aug 2009
Total Posts: 13737
11 May 2014 12:34 PM
Dang :/

#Piano
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
11 May 2014 12:35 PM
Get the look vector of the camera, and check whether the part is within 35 degrees left or 35 degrees right of it. If so, toss a ray cast from the camera to the part, and ensure that it doesn't hit anything in between.

If all of the above then print someone is looking.
Report Abuse
Kingmouli is not online. Kingmouli
Joined: 28 Sep 2012
Total Posts: 1292
11 May 2014 12:38 PM
http://www.roblox.com/Forum/ShowPost.aspx?PostID=129990124

It's kinda the same thing, I think ^.^
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image