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 » Scripters
Home Search
 

Re: Let us hypothesize.

Previous Thread :: Next Thread 
Augmentary is not online. Augmentary
Joined: 30 Aug 2013
Total Posts: 8081
25 Jan 2015 04:24 PM
I'm trying to get a local billboard GUI that is stored in another player's head to become visible once you and the other player are close enough together.

Just a hunch but I don't think I want to use magnitude.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
25 Jan 2015 04:25 PM
Use raycasting then. Magnitude is best, raycasting prevents seeing through walls, and pathfinding is impractical and inefficient and not what you want.
Report Abuse
Augmentary is not online. Augmentary
Joined: 30 Aug 2013
Total Posts: 8081
25 Jan 2015 04:27 PM
But I don't want a function going off every time another player moves to see if they're close enough..?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
25 Jan 2015 04:31 PM
Then display it all the time. If you make it efficient enough, it will hardly make a difference.

You don't need to do it 30 times per second, you can just do it every 1/15th or 1/10th of a second.
Report Abuse
Augmentary is not online. Augmentary
Joined: 30 Aug 2013
Total Posts: 8081
25 Jan 2015 04:59 PM
I guess.

But I need it displayed only when a player comes close enough to you. Anyway, wouldn't all of those functions lag the game a little bit?
Report Abuse
Augmentary is not online. Augmentary
Joined: 30 Aug 2013
Total Posts: 8081
25 Jan 2015 05:05 PM
I need it done really fast -- like as soon as the player enters the perimeter.
Report Abuse
earthyreuben is not online. earthyreuben
Joined: 17 Jan 2010
Total Posts: 669
25 Jan 2015 05:18 PM
If we hypothesizing, I have 3 solutions off the top of my head.

Solution 1: You could make a cylinder that is welded around the player which radius is the activation distance, that is transparent and cant collide, and have a script that waits for something to touch it, then check if it is a player that touched them and act accordingly.

Solution 2: You can use a local script to do the calculating for you (using magnitude which is really easy once you understand what it does) then when it finds someone close enough acts accordingly. (No lag to the server as the client does the calculation)

Solution 3: If you have filtering enabled, you could still use a local script, but you then would need to add a remote event that sends its find to a server script (and you can make it double check if you are suspicious of people) then act accordingly.

Of these, I like solution 3 the best. (1) It seems like the most fun to script, (2) It has filtering enabled which I like to have in my worlds.
Report Abuse
Augmentary is not online. Augmentary
Joined: 30 Aug 2013
Total Posts: 8081
26 Jan 2015 12:19 PM
I had the same idea in your Solution 1. I might go with that.
Report Abuse
Augmentary is not online. Augmentary
Joined: 30 Aug 2013
Total Posts: 8081
26 Jan 2015 09:50 PM
BLAH
Report Abuse
Augmentary is not online. Augmentary
Joined: 30 Aug 2013
Total Posts: 8081
26 Jan 2015 09:55 PM
Whatev I'm just going to do the brick thing.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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