View unanswered posts | View active topics It is currently Sat Dec 28, 2024 5:58 am



Reply to topic  [ 29 posts ]  Go to page 1, 2  Next
 Weapon sprites 
Author Message
User avatar

Joined: Mon Sep 28, 2009 2:15 am
Posts: 720
Location: A fucking desert.
Reply with quote
Post Weapon sprites
how would i make a weapon display a certain frame while reloading, and a different frame while loaded?


Sun Nov 15, 2009 3:47 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post 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.


Sun Nov 15, 2009 4:24 am
Profile WWW
User avatar

Joined: Mon Sep 28, 2009 2:15 am
Posts: 720
Location: A fucking desert.
Reply with quote
Post 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.


Sun Nov 15, 2009 4:47 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Weapon sprites
thats why you make the magazine undiscardable. look at the bear federation RPG for a practical example.


Sun Nov 15, 2009 6:42 am
Profile WWW
User avatar

Joined: Mon Sep 28, 2009 2:15 am
Posts: 720
Location: A fucking desert.
Reply with quote
Post Re: Weapon sprites
thank-you for helping me with this.


Sun Nov 15, 2009 9:49 am
Profile
User avatar

Joined: Fri Dec 22, 2006 4:20 am
Posts: 4772
Location: Good news everyone!
Reply with quote
Post 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?


Sun Nov 15, 2009 11:06 am
Profile WWW
User avatar

Joined: Mon Sep 28, 2009 2:15 am
Posts: 720
Location: A fucking desert.
Reply with quote
Post 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.


Sun Nov 15, 2009 6:37 pm
Profile
User avatar

Joined: Fri Dec 22, 2006 4:20 am
Posts: 4772
Location: Good news everyone!
Reply with quote
Post 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.


Sun Nov 15, 2009 7:14 pm
Profile WWW
User avatar

Joined: Mon Sep 28, 2009 2:15 am
Posts: 720
Location: A fucking desert.
Reply with quote
Post Re: Weapon sprites
oh. then no, that's not what i wanted.


Sun Nov 15, 2009 8:53 pm
Profile
Banned
User avatar

Joined: Thu May 14, 2009 9:22 pm
Posts: 826
Location: Lookin' forward to mocking people on Jan 1st 2013.
Reply with quote
Post 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.


Sun Nov 15, 2009 9:23 pm
Profile YIM
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post 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.


Mon Nov 16, 2009 12:12 am
Profile
User avatar

Joined: Mon Sep 28, 2009 2:15 am
Posts: 720
Location: A fucking desert.
Reply with quote
Post 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.


Mon Nov 16, 2009 12:29 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post 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.


Mon Nov 16, 2009 1:56 am
Profile
User avatar

Joined: Mon Sep 28, 2009 2:15 am
Posts: 720
Location: A fucking desert.
Reply with quote
Post 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.


Mon Nov 16, 2009 2:15 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post 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.


Mon Nov 16, 2009 4:30 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 29 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: Google [Bot]


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.051s | 15 Queries | GZIP : Off ]