Author |
Message |
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
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 |
|
|
Coops
Joined: Wed Feb 17, 2010 12:07 am Posts: 1545 Location: That small peaceful place called Hell.
|
Re: Gun sprites animation
I dont think you can through ini but through lua you can.
|
Fri Feb 11, 2011 5:03 am |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: Gun sprites animation
Really? You can play around with sprites via lua?
|
Fri Feb 11, 2011 5:06 am |
|
|
Coops
Joined: Wed Feb 17, 2010 12:07 am Posts: 1545 Location: That small peaceful place called Hell.
|
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 |
|
|
dragonxp
Joined: Wed Sep 09, 2009 3:16 am Posts: 3032 Location: Somewhere in the universe
|
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 |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
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 |
|
|
Coops
Joined: Wed Feb 17, 2010 12:07 am Posts: 1545 Location: That small peaceful place called Hell.
|
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 |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
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 |
|
|
Asatruer
Joined: Thu May 28, 2009 3:59 pm Posts: 209
|
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 |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
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 |
|
|
Coops
Joined: Wed Feb 17, 2010 12:07 am Posts: 1545 Location: That small peaceful place called Hell.
|
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 |
|
|
Azukki
Joined: Sat Nov 03, 2007 9:44 pm Posts: 1916 Location: Flint Hills
|
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 |
|
|
|