View unanswered posts | View active topics It is currently Mon Dec 30, 2024 10:12 pm



Reply to topic  [ 12 posts ] 
 Gun sprites animation 
Author Message
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Gun sprites animation
I know that we can set sprites for when the gun is firing, but can we set one for when the gun is reloading?
For example, those clasical 2 barreled shotguns, which to reload you have to pull the barrels down.


Fri Feb 11, 2011 4:51 am
Profile
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post Re: Gun sprites animation
I dont think you can through ini but through lua you can.


Fri Feb 11, 2011 5:03 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: Gun sprites animation
Really?
You can play around with sprites via lua?


Fri Feb 11, 2011 5:06 am
Profile
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post Re: Gun sprites animation
That is possible, yes.

You do have restrictions to it though, you can only change the FRAME of the sprite and not give it a different directory to another sprite.


Fri Feb 11, 2011 5:12 am
Profile
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: Gun sprites animation
Or you can attach an animated attachable to the gun...
edit: my bad.

Though for the firing part use spinup, and then sue lua to play the reloading.


Last edited by dragonxp on Fri Feb 11, 2011 5:19 am, edited 1 time in total.



Fri Feb 11, 2011 5:16 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: Gun sprites animation
But if I make a gun with 999 sprites, and the sprite 999 is the one in which the gun is reloading, I could set via lua that when the gun reloads change to sprite 999?


Fri Feb 11, 2011 5:18 am
Profile
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post Re: Gun sprites animation
Lets pretend this is the weapon's Script:

Code:
if self.IsReloading() then
  self.Frame = 999
else
  self.Frame = 1
end


That would do it.


Fri Feb 11, 2011 6:55 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post Re: Gun sprites animation
You can't have 999 sprites, and scripts on guns don't work unless you drop them.


Fri Feb 11, 2011 6:04 pm
Profile
User avatar

Joined: Thu May 28, 2009 3:59 pm
Posts: 209
Reply with quote
Post Re: Gun sprites animation
While lua does not currently run on attachments, this can probably be gotten around using emitted particles running the lua, like CaveCricket's awesome kludge Dual Weapon Mode Template.
Also, while 999 was assuredly hyperbole, what is the limit?


Fri Feb 11, 2011 6:13 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: Gun sprites animation
I meant 999 so that when I fired the gun I couldn't reach that sprite.
Alright, I'm getting confused. Is this possible or not?


Fri Feb 11, 2011 8:13 pm
Profile
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post Re: Gun sprites animation
Its still possible, just you need to make an emitter emit a particle that contains a script to check if an actor is holding this weapon and if its reloading.


Fri Feb 11, 2011 11:52 pm
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: Gun sprites animation
Asatruer wrote:
Also, while 999 was assuredly hyperbole, what is the limit?

It used to be 50, in the build before doors, [b18?] and I doubt it's changed. That's definitely something one would want to double-check before making a thousand sprites.

It's definitely no more than one thousand though, since that's as far as the file naming convention would work. 000-999


Sat Feb 12, 2011 11:36 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 12 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.060s | 13 Queries | GZIP : Off ]