Make Emit-sfx 2048 Obey All Weapon Properties
Moderator: Moderators
Make Emit-sfx 2048 Obey All Weapon Properties
Currently, it doesn't obey burst/burstrate for one.
Re: Make Emit-sfx 2048 Obey All Weapon Properties
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.
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
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.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.
Re: Make Emit-sfx 2048 Obey All Weapon Properties
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: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.
Code: Select all
emit-sfx myNiftyGun from flare;
sleep 30;
emit-sfx myNiftyGun from flare;
sleep 30;
emit-sfx myNiftyGun from flare;
Re: Make Emit-sfx 2048 Obey All Weapon Properties
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.
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
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
Which is not burst. And you can emit more than once in a single frame.Noruas wrote:Projectiles=x;
Re: Make Emit-sfx 2048 Obey All Weapon Properties
Use the "for" statment.REVENGE wrote:(although, in any case, it was not fun to copy and paste 10s of lines of emit-sfx code)
Code: Select all
var k;
for(k=1;k<=10;++k)
{
emit-sfx 2048 from somepiece;
sleep 1000;
}
Re: Make Emit-sfx 2048 Obey All Weapon Properties
I thought bos for loops are really slow?zwzsg wrote:Use the "for" statment.REVENGE wrote:(although, in any case, it was not fun to copy and paste 10s of lines of emit-sfx code)Personally, I wouldn't want emit-sfx to use the burst tag.Code: Select all
var k; for(k=1;k<=10;++k) { emit-sfx 2048 from somepiece; sleep 1000; }
(Yeah, I'm probably being delerious again aren't I?

Re: Make Emit-sfx 2048 Obey All Weapon Properties
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;
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
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
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
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.
- Pressure Line
- Posts: 2283
- Joined: 21 May 2007, 02:09
Re: Make Emit-sfx 2048 Obey All Weapon Properties
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.
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
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.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.