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: Gun engine and animations

Previous Thread :: Next Thread 
c_aps is not online. c_aps
Joined: 06 Jun 2016
Total Posts: 102
10 Jun 2016 10:51 PM
Can someone tell me what I have to learn to make a basic gun engine and do some good animations? I would really appreciate it and I will take the time to learn them. I just can't find any tutorials on these.

Thank you.
Report Abuse
c_aps is not online. c_aps
Joined: 06 Jun 2016
Total Posts: 102
10 Jun 2016 10:52 PM
And no that is not my original join date I have another account.
Report Abuse
c_aps is not online. c_aps
Joined: 06 Jun 2016
Total Posts: 102
10 Jun 2016 11:25 PM
bump
Report Abuse
c_aps is not online. c_aps
Joined: 06 Jun 2016
Total Posts: 102
11 Jun 2016 11:37 AM
bump2
Report Abuse
c_aps is not online. c_aps
Joined: 06 Jun 2016
Total Posts: 102
11 Jun 2016 11:51 AM
bump3
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
11 Jun 2016 11:52 AM
do you know how to script?
Report Abuse
c_aps is not online. c_aps
Joined: 06 Jun 2016
Total Posts: 102
11 Jun 2016 11:53 AM
Yes but I do not know were to find these 2 things.


whenever I'm sad I listen to this: youtu.be/X7STSog_Quw
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
11 Jun 2016 11:54 AM
what can you make rn
Report Abuse
c_aps is not online. c_aps
Joined: 06 Jun 2016
Total Posts: 102
11 Jun 2016 11:54 AM
I can make stuff... I am working on a game like apoc and it's going well.


whenever I'm sad I listen to this: youtu.be/X7STSog_Quw
Report Abuse
c_aps is not online. c_aps
Joined: 06 Jun 2016
Total Posts: 102
11 Jun 2016 11:56 AM
But I want to learn how to do gun engine's and animations for my next project.


whenever I'm sad I listen to this: youtu.be/X7STSog_Quw
Report Abuse
c_aps is not online. c_aps
Joined: 06 Jun 2016
Total Posts: 102
11 Jun 2016 03:17 PM
bumpy
Report Abuse
RegularTetragon is not online. RegularTetragon
Joined: 10 Oct 2009
Total Posts: 3085
11 Jun 2016 03:27 PM
Understanding the relationship between CFrames and Vectors is super important, and must be learned, not memorized if you want to create any type of spread system.

Trigonometry is super useful when calculating spread, or possibly cones of effect, as well as some interpolation things (I use the general form f(x) = -cos(x)/2 + .5 a lot for interpolation curves, because f(0) = 0 and f(1) = 1, but the transition is smooth)

Raycasting is critical.

Then any other knowledge you have can help make it more interesting, rather than just purely functional.

Filtering Enabled is super important just in general btw, to the point where it's not even worth learning the old way of doing things, which is arguably far more esoteric.

I use ContextActionService a lot because it makes cross platform input easier (closures help quite a bit to make a minimal amount of code as useful as possible for input handling because typically what you're doing is taking input and passing it to the server which handles the rest)


It's delightful, It's delicious, It's delovely!
Report Abuse
c_aps is not online. c_aps
Joined: 06 Jun 2016
Total Posts: 102
11 Jun 2016 03:28 PM
Alright thanks


whenever I'm sad I listen to this: youtu.be/X7STSog_Quw
Report Abuse
RegularTetragon is not online. RegularTetragon
Joined: 10 Oct 2009
Total Posts: 3085
11 Jun 2016 03:30 PM
Also, avoid loops as much as you can.
In most situations, either events or math is preferable.
Infinite loops should be avoided as much as possible, because there's probably an event you could either subscribe to or create that will handle it 1000 times better (and the code will be far easier to edit as a result)

One other thing:
Don't optimize prematurely. You should be focused on writing good code, not fast code. Good code means its easy to read, easy to edit, and can be easily worked into something else, not that it's necessarily fast.


It's delightful, It's delicious, It's delovely!
Report Abuse
Isosta is not online. Isosta
Joined: 10 May 2015
Total Posts: 14729
11 Jun 2016 03:32 PM
best event = renderstepped


the power of the meme ( ͡° ͜ʖ ͡°)
Report Abuse
RegularTetragon is not online. RegularTetragon
Joined: 10 Oct 2009
Total Posts: 3085
11 Jun 2016 04:33 PM
Renderstepped is the worst event, it's no better than an infinite loop, it's arguably worse sense it runs more often. The only time you should use RenderSteppped is for camera controls, smooth gui animations, and VR, and even for the latter there is an event which is arguably better called UserCFrameChanged because there's a chance, however minimal, that it won't run on that frame.

In most situations you don't need to do something every single frame.


It's delightful, It's delicious, It's delovely!
Report Abuse
Isosta is not online. Isosta
Joined: 10 May 2015
Total Posts: 14729
11 Jun 2016 04:34 PM
"Renderstepped is the worst event, it's no better than an infinite loop, it's arguably worse sense it runs more often. The only time you should use RenderSteppped is for camera controls, smooth gui animations, and VR, and even for the latter there is an event which is arguably better called UserCFrameChanged because there's a chance, however minimal, that it won't run on that frame."


bet i do.

tweenJoint = function(Joint,NewC0,NewC1,Duration)
local StartC0 = Joint.C0
local StartC1 = Joint.C1
spawn(function()
local tweenIndication = nil
local NewCode = math.random(-1e9, 1e9)
if (not Joint:FindFirstChild('TweenIndication')) then
tweenIndication = Instance.new('IntValue')
tweenIndication.Name = 'TweenIndication'
tweenIndication.Value = NewCode
tweenIndication.Parent = Joint
else
tweenIndication = Joint.TweenIndication
tweenIndication.Value = NewCode
end
local num = 1/((Duration*2) * 30)
for i=0,1,num do
if Joint:FindFirstChild('TweenIndication') and Joint:FindFirstChild('TweenIndication').Value == NewCode then
Joint.C1 = StartC1:lerp(NewC1,i)
Joint.C0 = StartC0:lerp(NewC0,i)
game:GetService("RunService").RenderStepped:wait()
elseif not Joint:FindFirstChild('TweenIndication') then error('Joint not found. Did your character die?') break else break end
end
if tweenIndication.Value == NewCode then
tweenIndication:Destroy()
end
end)
end


the power of the meme ( ͡° ͜ʖ ͡°)
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