Data Realms Fan Forums http://45.55.195.193/ |
|
Gun sprites animation http://45.55.195.193/viewtopic.php?f=1&t=21471 |
Page 1 of 1 |
Author: | Asklar [ Fri Feb 11, 2011 4:51 am ] |
Post subject: | 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. |
Author: | Coops [ Fri Feb 11, 2011 5:03 am ] |
Post subject: | Re: Gun sprites animation |
I dont think you can through ini but through lua you can. |
Author: | Asklar [ Fri Feb 11, 2011 5:06 am ] |
Post subject: | Re: Gun sprites animation |
Really? You can play around with sprites via lua? |
Author: | Coops [ Fri Feb 11, 2011 5:12 am ] |
Post subject: | 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. |
Author: | dragonxp [ Fri Feb 11, 2011 5:16 am ] |
Post subject: | Re: Gun sprites animation |
edit: my bad. Though for the firing part use spinup, and then sue lua to play the reloading. |
Author: | Asklar [ Fri Feb 11, 2011 5:18 am ] |
Post subject: | 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? |
Author: | Coops [ Fri Feb 11, 2011 6:55 am ] |
Post subject: | 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. |
Author: | Roast Veg [ Fri Feb 11, 2011 6:04 pm ] |
Post subject: | Re: Gun sprites animation |
You can't have 999 sprites, and scripts on guns don't work unless you drop them. |
Author: | Asatruer [ Fri Feb 11, 2011 6:13 pm ] |
Post subject: | 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? |
Author: | Asklar [ Fri Feb 11, 2011 8:13 pm ] |
Post subject: | 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? |
Author: | Coops [ Fri Feb 11, 2011 11:52 pm ] |
Post subject: | 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. |
Author: | Azukki [ Sat Feb 12, 2011 11:36 pm ] |
Post subject: | 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 |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |