Data Realms Fan Forums
http://45.55.195.193/

Weapon sprites
http://45.55.195.193/viewtopic.php?f=1&t=17137
Page 1 of 2

Author:  Urch [ Sun Nov 15, 2009 3:47 am ]
Post subject:  Weapon sprites

how would i make a weapon display a certain frame while reloading, and a different frame while loaded?

Author:  Geti [ Sun Nov 15, 2009 4:24 am ]
Post subject:  Re: Weapon sprites

if you mean displaying a magazine as though its in the weapon, see the multitude of examples out there.
if you mean, like, adding a light or something once its loaded you're going to need to sprite the magazine to look like those things and set it to discardable = 0, like the shotgun magazine and a few others. there is no real build in way, i dont think.

Author:  Urch [ Sun Nov 15, 2009 4:47 am ]
Post subject:  Re: Weapon sprites

i actually meant like, making a crossbow appear loaded when it's loaded and not loaded when it's not loaded. if i could do that with magazines i'd like to know how, because i do not want a shot firing and an identicle image spawning due to the magazine coming out as well.

Author:  Geti [ Sun Nov 15, 2009 6:42 am ]
Post subject:  Re: Weapon sprites

thats why you make the magazine undiscardable. look at the bear federation RPG for a practical example.

Author:  Urch [ Sun Nov 15, 2009 9:49 am ]
Post subject:  Re: Weapon sprites

thank-you for helping me with this.

Author:  CrazyMLC [ Sun Nov 15, 2009 11:06 am ]
Post subject:  Re: Weapon sprites

Or you can always make the magazine null and just make the sprites frames whatever...
Am I the only one who does this?

Author:  Urch [ Sun Nov 15, 2009 6:37 pm ]
Post subject:  Re: Weapon sprites

CrazyMLC wrote:
Or you can always make the magazine null and just make the sprites frames whatever...
Am I the only one who does this?

this is what i was asking how to do.

Author:  CrazyMLC [ Sun Nov 15, 2009 7:14 pm ]
Post subject:  Re: Weapon sprites

Weapons automatically do it, frame 1(000) shows when not fired and frame 2(001) shows when fired. You just have to make two frames and make CC use 'em like always.

Author:  Urch [ Sun Nov 15, 2009 8:53 pm ]
Post subject:  Re: Weapon sprites

oh. then no, that's not what i wanted.

Author:  Metal Meltdown [ Sun Nov 15, 2009 9:23 pm ]
Post subject:  Re: Weapon sprites

MLC's point was that if it's a one-shot weapon, you can simply have the first frame loaded, and the second will kick in once the round is fired, i.e. when the weapon reloads, if it's timed right.

Author:  Duh102 [ Mon Nov 16, 2009 12:12 am ]
Post subject:  Re: Weapon sprites

If'n you want something like a crossbow bolt to disappear when reloading, take a look at the crossbow and bows in Melee Master Arms. They do what you want.

Author:  Urch [ Mon Nov 16, 2009 12:29 am ]
Post subject:  Re: Weapon sprites

If i make two sprites for something, and leave it as default, the sprite changes while firing then changes back instantly after firing, but does not stay on the second frame when reloading.

Edit:
Image

Image
what i wanted to make, is have the top sprite be the sprite when loaded, but after firing, to have the bottom sprite be the sprite, then when done reloading, the top sprite is the sprite again.

Author:  CaveCricket48 [ Mon Nov 16, 2009 1:56 am ]
Post subject:  Re: Weapon sprites

Lua could do that, but not .ini coding (at least I don't think so).

To do that with Lua, give the gun an emitter that has BurstSize = 1 and ParticlesperMinute = 0. The particle it fires is Lua'd and finds the closest MO ( your gun). Then it detects it the gun has max ammo or not and changes the frame accordingly. The gun should also be Lua'd to look for the Lua particle on the Create function and make it if it doesn't exist so it can work in the bunker building phase.

My pulse rifles use this trick, except of changing frames, it switches weapons.

Author:  Urch [ Mon Nov 16, 2009 2:15 am ]
Post subject:  Re: Weapon sprites

I am sad now. i don't know lua. oh well, i guess i can always make it at some other time when i've actually learned lua.

Author:  Geti [ Mon Nov 16, 2009 4:30 am ]
Post subject:  Re: Weapon sprites

Duh102 wrote:
If'n you want something like a crossbow bolt to disappear when reloading, take a look at the crossbow and bows in Melee Master Arms. They do what you want.
Go try this, rather than any lua hackiness.

Page 1 of 2 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/