AxonMega
|
  |
| Joined: 29 Aug 2014 |
| Total Posts: 2403 |
|
|
| 29 Jun 2016 04:04 PM |
So for a while I have been trying to make a GUI arrow that points to an enemy player when they shoot you, like in many FPSs. After two forum threads and a lot of arguing with trolls, I finally figured it out. Special thanks to DiamondBladee, who selflessly did his best to help me. To the trolls I dealt with: leave this forum. It is a place for scripters to chat and help with each other, not to be total jerks to everyone. As a community service, I will post the code below:
--scripted by AxonMega
local hitArrow = a ImageLabel inside a ScreenGui that is in the center of you screen local enemyC = the character of the enemy that just shot you
--now we rotate the arrow
local point = workspace.CurrentCamera:WorldToViewportPoint(enemyC.Head.Position) local position = Vector2.new(point.X, point.Y - 40) local rPosition = position - (hitArrow.AbsolutePosition + Vector2.new(100, 100)) if rPosition.Y > 0 then hitArrow.Rotation = 180 + math.deg(math.atan(-1*rPosition.X/rPosition.Y)) else hitArrow.Rotation = math.deg(math.atan(-1*rPosition.X/rPosition.Y)) end
--the sophistication of a script should be determined not by how great the number of lines, but by how many complex functions you can fit into the least amount of lines |
|
|
| Report Abuse |
|
|
|
| 29 Jun 2016 04:05 PM |
"--scripted by AxonMega"
... |
|
|
| Report Abuse |
|
|
AxonMega
|
  |
| Joined: 29 Aug 2014 |
| Total Posts: 2403 |
|
|
| 29 Jun 2016 04:07 PM |
| I put it at the beginning of every amazing script I write. |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
| |
|
AxonMega
|
  |
| Joined: 29 Aug 2014 |
| Total Posts: 2403 |
|
|
| 30 Jun 2016 07:45 AM |
Are you saying it's funny that I put --scripted by AxonMega at the beginning of all of my scripts? I know many other scripters who do that too. Or if you're suggesting that you don't believe I made this script, you would be wrong. I bet you won't find a single free model or internet tutorial that matches my script at all.
Anyway, I'm bumping this thread so that more scripters get to see and learn from it.
--lol can mean many things |
|
|
| Report Abuse |
|
|
| |
|
AxonMega
|
  |
| Joined: 29 Aug 2014 |
| Total Posts: 2403 |
|
|
| 30 Jun 2016 07:59 AM |
| LOLOLOLOLOLOLOLLOLOOOOOOOOLLLLLLLLL :) |
|
|
| Report Abuse |
|
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
|
| 30 Jun 2016 08:05 AM |
I dont see the problem, he's probably going to publish it as a free model.
... its fine, so other's can learn off of it. |
|
|
| Report Abuse |
|
|
| |
|
AxonMega
|
  |
| Joined: 29 Aug 2014 |
| Total Posts: 2403 |
|
|
| 30 Jun 2016 08:10 AM |
| Nope, I don't do free models. People don't learn from free models. |
|
|
| Report Abuse |
|
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
|
| 30 Jun 2016 08:13 AM |
| I started off learning Lua from messing with scripts in FMs. |
|
|
| Report Abuse |
|
|
AxonMega
|
  |
| Joined: 29 Aug 2014 |
| Total Posts: 2403 |
|
|
| 30 Jun 2016 08:14 AM |
| Hmm. I never learned anything from free models except that people can make ridiculously and unnecessarily complicated and messy code. |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2016 08:45 AM |
| ^ You're annoying, @AxonMeg. Shut up, please |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2016 08:47 AM |
| @Rapid I like axon's posts c: |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 30 Jun 2016 08:49 AM |
You're annoying, @AxonMeg. Shut up, please [2]
- Isosta |
|
|
| Report Abuse |
|
|
Skellobit
|
  |
| Joined: 13 Apr 2016 |
| Total Posts: 12758 |
|
|
| 30 Jun 2016 09:35 AM |
why does axon even bother posting this script that nobody wants we don't care that you just learned how to do simple math
Formerly ToxicDominator - add 17,509 posts | :(){:|:&};: |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
| |
|
Meowth552
|
  |
| Joined: 17 Dec 2009 |
| Total Posts: 2181 |
|
|
| 30 Jun 2016 09:47 AM |
"Are you saying it's funny that I put --scripted by AxonMega at the beginning of all of my scripts? I know many other scripters who do that too. Or if you're suggesting that you don't believe I made this script, you would be wrong. I bet you won't find a single free model or internet tutorial that matches my script at all.
Anyway, I'm bumping this thread so that more scripters get to see and learn from it." -AxonMega
M'lady. *Tips fedora.* |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
| |
|
Skellobit
|
  |
| Joined: 13 Apr 2016 |
| Total Posts: 12758 |
|
|
| 30 Jun 2016 09:50 AM |
lol someone needs to save all of axon's quotes
Formerly ToxicDominator - add 17,509 posts | :(){:|:&};: |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2016 09:50 AM |
while true do end
This siggy is copyrighted © |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2016 10:32 AM |
math.atan2 (y, x)
Returns the arc* tangent of y/x (in radians), but uses the signs of both parameters to find the quadrant of the result. It also handles correctly the case of x being zero.
get rekt skrub. |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2016 10:57 AM |
@Axon I started with free models, look where I am now.
|
|
|
| Report Abuse |
|
|
|
| 30 Jun 2016 11:02 AM |
Well despite the negativity, I think it's cool that you were able to do that! Nice job!
|
|
|
| Report Abuse |
|
|
AxonMega
|
  |
| Joined: 29 Aug 2014 |
| Total Posts: 2403 |
|
|
| 30 Jun 2016 03:06 PM |
I leave this script alone for a few hours and it's already covered in trolls. Will they never cease?
--Instead of thanking me, they tell me nobody cares. What jerks. |
|
|
| Report Abuse |
|
|