Page 1 of 1
Make Emit-sfx 2048 Obey All Weapon Properties
Posted: 07 Dec 2008, 08:21
by REVENGE
Currently, it doesn't obey burst/burstrate for one.
Re: Make Emit-sfx 2048 Obey All Weapon Properties
Posted: 07 Dec 2008, 08:58
by KDR_11k
Oh come on, you can do a burst yourself.
I don't think burst handling would work very well anyway since emit-sfx is pretty hacky and the later shots probably wouldn't be fired from the same piece and in the same direction.
Re: Make Emit-sfx 2048 Obey All Weapon Properties
Posted: 07 Dec 2008, 10:38
by REVENGE
KDR_11k wrote:Oh come on, you can do a burst yourself.
I don't think burst handling would work very well anyway since emit-sfx is pretty hacky and the later shots probably wouldn't be fired from the same piece and in the same direction.
Correct, but doing it yourself only makes it worse, since you can't achieve the full burst-rate using repeated emit-sfx compared to using the burstrate tag.
Re: Make Emit-sfx 2048 Obey All Weapon Properties
Posted: 07 Dec 2008, 18:04
by Argh
Correct, but doing it yourself only makes it worse, since you can't achieve the full burst-rate using repeated emit-sfx compared to using the burstrate tag.
Er, the last time I tested, weapons can't fire more than once every frame anyhow. Firing's a sync event, so I don't see how:
Code: Select all
emit-sfx myNiftyGun from flare;
sleep 30;
emit-sfx myNiftyGun from flare;
sleep 30;
emit-sfx myNiftyGun from flare;
... can possibly be any slower than a weapon with a maximum fire-rate. If you have proof otherwise, let's talk about that.
Re: Make Emit-sfx 2048 Obey All Weapon Properties
Posted: 07 Dec 2008, 22:09
by Noruas
Well I thought the whole point of... Projectiles=x;
is that it can spawn more then one weapon in the same frame. Does this work, if what Argh says is true, then it should.
Re: Make Emit-sfx 2048 Obey All Weapon Properties
Posted: 07 Dec 2008, 23:05
by REVENGE
Hmm, maybe I'm imagining things, I should double check whether there was a difference (although, in any case, it was not fun to copy and paste 10s of lines of emit-sfx code). Also, working projectiles tag would be awesome, better check that as well.
Re: Make Emit-sfx 2048 Obey All Weapon Properties
Posted: 07 Dec 2008, 23:30
by lurker
Noruas wrote:Projectiles=x;
Which is not burst. And you can emit more than once in a single frame.
Re: Make Emit-sfx 2048 Obey All Weapon Properties
Posted: 12 Dec 2008, 00:57
by zwzsg
REVENGE wrote:(although, in any case, it was not fun to copy and paste 10s of lines of emit-sfx code)
Use the "
for" statment.
Code: Select all
var k;
for(k=1;k<=10;++k)
{
emit-sfx 2048 from somepiece;
sleep 1000;
}
Personally, I wouldn't want emit-sfx to use the burst tag.
Re: Make Emit-sfx 2048 Obey All Weapon Properties
Posted: 12 Dec 2008, 16:38
by REVENGE
zwzsg wrote:REVENGE wrote:(although, in any case, it was not fun to copy and paste 10s of lines of emit-sfx code)
Use the "
for" statment.
Code: Select all
var k;
for(k=1;k<=10;++k)
{
emit-sfx 2048 from somepiece;
sleep 1000;
}
Personally, I wouldn't want emit-sfx to use the burst tag.
I thought bos for loops are really slow?
(Yeah, I'm probably being delerious again aren't I?

)
Re: Make Emit-sfx 2048 Obey All Weapon Properties
Posted: 12 Dec 2008, 19:59
by zwzsg
Maybe you were told it's slow for a loop iterating through all units ID or something. But
for(k=1;k<=10;++k) stuff;
is half a thousand time faster than
for(k=1;k<=5000;++k) stuff;
Re: Make Emit-sfx 2048 Obey All Weapon Properties
Posted: 12 Dec 2008, 20:21
by Argh
Yeah, zwzsg is right. BOS FOR loops are pretty slow, compared to other FOR loops, but are still more than fast enough that you won't notice it being used for something like this. I use 'em all the time in P.U.R.E.
What you
will notice, almost immediately, is how much CPU gets eaten, if you spawn multiple projectiles every frame. Let's just say that if this isn't Krogoth-rare, it's probably a very bad idea.
But you seem enthusiastic enough about the idea that I guess we should just assume you're going to do it whether or not we tell you it's doomed

Re: Make Emit-sfx 2048 Obey All Weapon Properties
Posted: 17 Dec 2008, 08:30
by REVENGE
All I've been using this for is faking some semi-predictive flamethrower weapon. I would be really happy if flamethrowers got target leading and prediction at the engine level.
Re: Make Emit-sfx 2048 Obey All Weapon Properties
Posted: 17 Dec 2008, 09:20
by Pressure Line
you could probably bind it to a weapon that does lead and just give the leading weapon projectiles=0
write the script so that the flamethrower isnt aimed unless the other weapon is, then find a way to trick it into thinking its aimed straight at the target when its actually leading.
*shrug* iono.
Re: Make Emit-sfx 2048 Obey All Weapon Properties
Posted: 19 Dec 2008, 06:39
by REVENGE
Pressure Line wrote:you could probably bind it to a weapon that does lead and just give the leading weapon projectiles=0
write the script so that the flamethrower isnt aimed unless the other weapon is, then find a way to trick it into thinking its aimed straight at the target when its actually leading.
*shrug* iono.
Yeah, that was more or less the first thing that I tried, although I can't judge how much of an honest attempt I made. Long story short, didn't get it to work that way, doesn't mean it couldn't though.