(UPDATE) Smooth Custom Animation System

Trying to add it again but I doubt the results I`ll get.

Anywho I just finished M107 reload animation and am doing weapon bobbling next! :smiley:

What are you using to make your guns? They look very good, especially the sniper.

Got it working! Turns out renderstepped only worked at 60 FPS, so I just used stepped. Whats the difference between what I used to have and .Stepped?

I build them so big that when i scale them down I use a 25x down-scale factor. I use the new DX4 or whatever (The ones from Murder Mystery) in a personal build server, then go into edit and have a script mini-map and weld them.

Sorry for focusing on the building aspect, but what is a DX4 and why do you need a PBS? I’m wanting to make my own guns for a game I’m working on and I’d like for someone that’s good at it to point me in the right direction.

Oops. I meant this: http://www.roblox.com/Building-Tools-by-F3X-item?id=142785488

And I do public build servers so that I can walk around the gun, it sounds weird but it REALLY helps keep the scale on-point, even if the gun is bigger than my character.

Put the spawn in the houses. It is too easy to spawnkill :stuck_out_tongue: It’s hard to test weapons while dead…

And you might want to take the word ā€œassā€ out of the description, you could get a warning/ban.

Ass is allowed, lol.

And I just updated it. Bunch of bug/lag fixes, and updated the RPG’s smoke stream! :slight_smile:

Taking time off of roblox to edit this some more.

This quarternion system sounds really useful, Ima play around with it over some break

I didn’t quite like the arm placement and the animations didn’t feel smooth. You should use renderstepped, as previously mentioned. It didn’t work or what? Also you are suppossed to get delta time and use that for animations, then you’ll get animations synced with FPS, while keeping it’s tweening time.

Delta tick() you mean? I don’t think time() really works well at 60FPS

Delta tick() you mean? I don’t think time() really works well at 60FPS[/quote]

Well it doesn’t really matter what you use. I think I used tick, I haven’t tried how well it goes with time().

How did you manage to interrupt the animations smoothly?

Each frame checks the animation ID, which is changed each time a new animation is begun.

Hmm could you show me an example in a code snippet?

Basically, you can just have a table with welds set as keys, and the ā€œidā€ set as a value. When you call the function on a weld, add one to the value. Also make sure that the function checks each time it updates the weld to see if that number is the same. If not, break the loop. I’ll see if I can get some code for you in a few minutes.

edit: This is a pretty basic example. The first function will count to five, see that the ID has changed, and stop. Then, the second function will count upwards endlessly.

[code]local ID = 1
function Count()
Spawn(function()
local Current = ID + 1
local CurrentNumber = 0
ID = Current

	while true do
		if Current == ID then
			CurrentNumber = CurrentNumber + 1
			print(CurrentNumber)
		end
		wait(1)
	end
end)

end

Count()
wait(5)
Count()[/code]

I’m working on one as well :smiley:

Yep I think I managed to get that working now, thanks.

Next question, how did you convert xLegox’s quarternion interpolate to work on welds? I couldn’t seem work out how to convert the part Cframe interpolation into working with the weld properties of C0 and C1.

Basically, you can just have a table with welds set as keys, and the ā€œidā€ set as a value. When you call the function on a weld, add one to the value. Also make sure that the function checks each time it updates the weld to see if that number is the same. If not, break the loop. I’ll see if I can get some code for you in a few minutes.

edit: This is a pretty basic example. The first function will count to five, see that the ID has changed, and stop. Then, the second function will count upwards endlessly.

[code]local ID = 1
function Count()
Spawn(function()
local Current = ID + 1
local CurrentNumber = 0
ID = Current

	while true do
		if Current == ID then
			CurrentNumber = CurrentNumber + 1
			print(CurrentNumber)
		end
		wait(1)
	end
end)

end

Count()
wait(5)
Count()[/code][/quote]
The only problem with that code is that you don’t handle threads. Over time you’re going to have a thread overflow and the script will have something bad happen to it.