Make Emit-sfx 2048 Obey All Weapon Properties

Make Emit-sfx 2048 Obey All Weapon Properties

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Make Emit-sfx 2048 Obey All Weapon Properties

Post by REVENGE »

Currently, it doesn't obey burst/burstrate for one.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Make Emit-sfx 2048 Obey All Weapon Properties

Post 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.
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Make Emit-sfx 2048 Obey All Weapon Properties

Post 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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Make Emit-sfx 2048 Obey All Weapon Properties

Post 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.
User avatar
Noruas
XTA Developer
Posts: 1269
Joined: 24 Feb 2005, 02:58

Re: Make Emit-sfx 2048 Obey All Weapon Properties

Post 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.
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Make Emit-sfx 2048 Obey All Weapon Properties

Post 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.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Make Emit-sfx 2048 Obey All Weapon Properties

Post by lurker »

Noruas wrote:Projectiles=x;
Which is not burst. And you can emit more than once in a single frame.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Make Emit-sfx 2048 Obey All Weapon Properties

Post 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.
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Make Emit-sfx 2048 Obey All Weapon Properties

Post 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? :lol:)
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Make Emit-sfx 2048 Obey All Weapon Properties

Post 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;
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Make Emit-sfx 2048 Obey All Weapon Properties

Post 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 ;)
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Make Emit-sfx 2048 Obey All Weapon Properties

Post 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.
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: Make Emit-sfx 2048 Obey All Weapon Properties

Post 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.
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Make Emit-sfx 2048 Obey All Weapon Properties

Post 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.
Post Reply

Return to “Feature Requests”