View previous topic :: View next topic |
Author |
Message |
lukas2288
Joined: 14 Jun 2009 Posts: 42
|
Posted: Sat Jun 20, 2009 9:15 pm Post subject: Quake Sprites |
|
|
Hi guys
i want to make plasma sprites.For example i will show this picture
http://img141.imageshack.us/img141/5823/missile.jpg
How can i make it in firerocket to use for example this jpg file?I tried fimg but it wrote me that save function does not work.Is there some way to create more frames for example on missile explode?
PS:Sorry for my english. |
|
Back to top |
|
 |
lukas2288
Joined: 14 Jun 2009 Posts: 42
|
Posted: Mon Jun 22, 2009 6:58 pm Post subject: Re: Quake Sprites |
|
|
lukas2288 wrote: | Hi guys
i want to make plasma sprites.For example i will show this picture
http://img141.imageshack.us/img141/5823/missile.jpg
How can i make it in firerocket to use for example this jpg file?I tried fimg but it wrote me that save function does not work.Is there some way to create more frames for example on missile explode?
PS:Sorry for my english. |
Or how can imake visible only the picture without the black square in game. |
|
Back to top |
|
 |
MauveBib

Joined: 04 Nov 2004 Posts: 602
|
Posted: Mon Jun 22, 2009 9:59 pm Post subject: |
|
|
You need to use the alpha channel of the TGA to represent transparency. _________________ Apathy Now! |
|
Back to top |
|
 |
lukas2288
Joined: 14 Jun 2009 Posts: 42
|
Posted: Tue Jun 23, 2009 4:03 pm Post subject: |
|
|
MauveBib wrote: | You need to use the alpha channel of the TGA to represent transparency. |
PLease can you send me some freeware program which will do this?I think that Photoshop can do that but it is shareware. |
|
Back to top |
|
 |
MauveBib

Joined: 04 Nov 2004 Posts: 602
|
Posted: Tue Jun 23, 2009 4:23 pm Post subject: |
|
|
I think http://www.gimp.org/ is probably the best freeware image manipulation software., but I'm not sure since I use a commercial package. _________________ Apathy Now! |
|
Back to top |
|
 |
lukas2288
Joined: 14 Jun 2009 Posts: 42
|
Posted: Sun Jul 05, 2009 7:49 am Post subject: |
|
|
Last question about sprites.I madeing plasma weapons and spr files containes 4 frames.But when i fired it plays only frame 1.How can i increase it into 4 frames? |
|
Back to top |
|
 |
Error Inside3D Staff

Joined: 05 Nov 2004 Posts: 558 Location: VA, USA
|
|
Back to top |
|
 |
lukas2288
Joined: 14 Jun 2009 Posts: 42
|
Posted: Sun Jul 05, 2009 5:01 pm Post subject: |
|
|
Error wrote: | you have to manually loop it.
go through each frame. it won't play on it's own. |
Do you mean on qc or in fimg? |
|
Back to top |
|
 |
Dr. Shadowborg Inside3D Staff

Joined: 16 Oct 2004 Posts: 726
|
Posted: Sun Jul 05, 2009 7:54 pm Post subject: |
|
|
lukas2288 wrote: | Error wrote: | you have to manually loop it.
go through each frame. it won't play on it's own. |
Do you mean on qc or in fimg? |
He means in qc. _________________ "Roboto suggests Plasma Bazooka." |
|
Back to top |
|
 |
metlslime
Joined: 05 Feb 2008 Posts: 177
|
Posted: Mon Jul 06, 2009 7:07 am Post subject: |
|
|
there is client-side looping on sprites (framegroups) just like in models. Not sure what sprite tools support it though. |
|
Back to top |
|
 |
metlslime
Joined: 05 Feb 2008 Posts: 177
|
Posted: Mon Jul 06, 2009 7:07 am Post subject: |
|
|
....or engines. |
|
Back to top |
|
 |
leileilol

Joined: 15 Oct 2004 Posts: 1321
|
Posted: Mon Jul 06, 2009 9:35 am Post subject: |
|
|
metlslime wrote: | ....or engines. |
I know Qtest supported that feature _________________
 |
|
Back to top |
|
 |
lukas2288
Joined: 14 Jun 2009 Posts: 42
|
Posted: Mon Jul 06, 2009 6:18 pm Post subject: |
|
|
i know that here is some example code in weapons qc:
void() s_explode1 = [0, s_explode2] {};
void() s_explode2 = [1, s_explode3] {};
void() s_explode3 = [2, s_explode4] {};
void() s_explode4 = [3, s_explode5] {};
void() s_explode5 = [4, s_explode6] {};
void() s_explode6 = [5, SUB_Remove] {};
void() BecomeExplosion =
{
self.movetype = MOVETYPE_NONE;
self.velocity = '0 0 0';
self.touch = SUB_Null;
setmodel (self, "progs/s_explod.spr");
self.solid = SOLID_NOT;
s_explode1 ();
};
so here is the new effect spr:
void() n_effect1 = [0, n_effect] {};
void() n_effect2 = [1, n_effect] {};
void() n_effect3 = [2, n_effect] {};
void() n_effect4 = [3, n_effect1] {};
void() NewEffect =
{
self.movetype = MOVETYPE_NONE;
self.velocity = '0 0 0';
self.touch = SUB_Null;
setmodel (self, "progs/neweffect.spr");
self.solid = SOLID_NOT;
n_effect1 ();
};
But how can i put it for example in FireRocket function to replace missile.mdl with animated NewEffect? |
|
Back to top |
|
 |
Dr. Shadowborg Inside3D Staff

Joined: 16 Oct 2004 Posts: 726
|
Posted: Mon Jul 06, 2009 6:59 pm Post subject: |
|
|
lukas2288 wrote: | But how can i put it for example in FireRocket function to replace missile.mdl with animated NewEffect? |
If this is an impact explosion, then just look in T_MissileTouch and replace the BecomeExplosion(); with NewEffect();. (note that you have a bug in your animation code that will cause the animation to never dissappear and continue to animate.)
If this is for a projectile animation, then what you need to do is add something like this:
Code: |
void() PlasmaThink =
{
self.frame = self.frame + 1; // Advance frame by one every think.
if(self.frame > 3) // start from beginning of animation if it's time
self.frame = 0;
if(self.attack_finished <= time) // Remove if lifetime is exceeded
remove(self);
self.think = PlasmaThink;
self.nextthink = time + 0.01; // this is the anim framerate speed
};
|
Then, in FireRocket or whatever change this:
Code: |
missile.nextthink = time + 5;
missile.think = SUB_Remove;
setmodel(missile, "progs/missile.mdl");
|
To this:
Code: |
missile.frame = 0; // set what frame it starts at
missile.nextthink = time + 0.01; // set nextthink time
missile.think = PlasmaThink; // set what it's supposed to think about
missile.attack_finished = time + 5; // dissappear in 5 secs if no impact
setmodel(missile, "progs/neweffect.spr"); // set model to new plasma sprite
|
_________________ "Roboto suggests Plasma Bazooka." |
|
Back to top |
|
 |
metlslime
Joined: 05 Feb 2008 Posts: 177
|
Posted: Mon Jul 06, 2009 9:37 pm Post subject: |
|
|
leileilol wrote: | metlslime wrote: | ....or engines. |
I know Qtest supported that feature |
Well, glquake broke a bunch of stuff with sprites (e.g. orientations) and models (i.e. only correctly supports 2- or 4- frame skingroups) so it could have broken sprite framegroups too. And since glquake is the daddy of a bunch of engines out there, if glquake broke it, it's likely broken in a bunch of engines. |
|
Back to top |
|
 |
|