Page 3 of 4
Posted: 27 Sep 2006, 22:24
by Caydr
Just scriptor being gay, it's working now. Thanks
Posted: 27 Sep 2006, 23:04
by Caydr
W00tzies

Posted: 27 Sep 2006, 23:36
by knorke
Looking good!
Which mod is this unit from? (or just testing)
Posted: 28 Sep 2006, 00:28
by Soulless1
is that GEM?

Posted: 28 Sep 2006, 07:46
by rattle
Caydr, you DO know that the exhausts won't stop when the unit has landed?
How ever you could be using MoveRate1() (up to MoveRate3()) and set a var depending on moverate...
Ok imagine you have 3 different AFT effects on your unit (one being occasional smoke, one a flame + smoke and the other a heavy flame, e.g. afterburner)...
Now what you could do is set a variable in these functions to either 0, 1 or 2 and add this var to the 1024 in the emit-sfx section... a good idea would be to increase the sleep value depending on move rate so the unit doesn't produce too much particles when idle (it will slow some people down

).
Anyway a function to determine the ground height of the root object and start/stop emitting then if it differs would be the best approach I think. Hell you could even have vertical thrusters for taking off landing...
Posted: 28 Sep 2006, 19:57
by Caydr
exhausts won't stop when the unit has landed?
Ah-ah-ah! I can specify when I want explosions to happen, so I've turned off the flame effect and most of the smoke when it's on the ground :D
Posted: 28 Sep 2006, 20:18
by rattle
I knew these ground, air, underwater and water tag's weren't just for show... yeah didn't think about that :P. The script still emits though...
Posted: 29 Sep 2006, 22:16
by LathanStanley
ummm... the only engines I've EVER seen that give off that much smoke that ARE NOT BROKE!!.. are freakin solid fuel booster rockets...
lol
and booster rockets are a 1 click THRUST BURN! die... there is no throttle, there is no fuel... it just burns, then is gone...
and frankly... a fightercraft, spacecraft.. on those.. isn't plausable..
consider removing most of the smoke...

Posted: 29 Sep 2006, 22:53
by rattle
Wondering how many of the birds were fried during the launch... :)
Man there needs to be a KFC co-worker with a bucket collecting any roasted birds that fall down...
Caydr about the exhaust flame, the intial values I posted do work, build on them instead.
Posted: 02 Oct 2006, 17:10
by rattle
Since this thread is about replacing the actual hackish show/hide flare effect I'm gonna show something nice Yeha made (and now finally fixed):
Code: Select all
[LARGE_MUZZLE_FLASH_FX]
{
[LargeMuzzleFlame]
{
class = CBitmapMuzzleFlame;
[properties]
{
dir = dir;
colorMap=0.9 0.8 0 0.01 0.9 1 1 0.01;
size=9;
length=15;
sizeGrowth=-1;
ttl=10;
frontOffset=0;
sideTexture=muzzleside;
frontTexture=muzzlefront;
}
water=1;
air=1;
underwater=1;
ground=1;
count=1;
}
}
Now some explanation on the tags:
dir - Direction of the particle, simply leave it "dir=dir;"
size, lenght - self explanatory
sizeGrowth - How much it grows in time TTL. -1 means it'll shrink until it's gone, TTL defines how fast it will shrink then.
frontOffset - Self explanatory, sets the effect x gameunits off the emitted piece
frontTexture, sideTexture - Defines which textures to be used. Uses keywords from the resources.tdf.
TTL - Time To Live - probably in frames or ms.
colorMap
Color map can use an unlimited amount of RGBA values (according to Tobi?). The textures are then going to be blended from the first RGBA color statement to the next and so on. Keep the alpha values low (0.01) in order to get some nice additive alpha blending. Also I found that textures with a black background and no alpha channel to blend nicer than the same with alpha channel (and transparency).
Now that Yeha finally fixed it, it can be emitted from an empty piece (a "flare" for instance) and it uses the pieces roation so it can be rotated by script.
The same class also is pretty useful for thruster like effects I found.
This is probably going to be in 0.73b1 cause it's in the latest SVN. It was already in the test releases (at least I think it was) but it's bugged because it was using the first two vertices from the object to determine the direction before.
Yeha is the man :)
Posted: 02 Oct 2006, 20:08
by Caydr
Yeah... there was way too much smoke. I didn't really have much to work with though. Without a LOT of smoke, the engine glow trailed the fighter too much.
I'm glad to see more generic fire/explosion stuff works now. I just need to find a new build.
Posted: 23 Oct 2006, 12:40
by Yeha
An update on this topic.
For next release emit-sfx 2048 will allways fire the weapon even if there is less than 2 vertices.
emit-sfx 4096 will instead be used for detonating a weapon at a specific piece.
This is so rotation from the piece can be used if there is no vertices to determine direction for the weapon.
Posted: 23 Oct 2006, 16:00
by KDR_11k
Cool. Thanks.
Posted: 25 Oct 2006, 09:57
by Argh
Sweetness! I am playing with this stuff now... expect some nifty muzzle-flashes... and a few other tidbits... in the next NanoBlobs, heh...
Posted: 25 Oct 2006, 11:42
by rattle
Posted: 30 Oct 2006, 20:06
by Sheekel
Could this be used to add some neat effects to planes, like this?
http://www.playfuls.com/images/screensh ... r/0046.jpg
Posted: 31 Oct 2006, 22:04
by PauloMorfeo
Could that system be adapted to:
Code: Select all
[SFXTypes]
{
explosiongenerator0=custom:EXPLOSION1;
explosiongenerator1=custom:EXPLOSION2;
explosiongenerator2=custom:CreateZerglings;
}
Code: Select all
[CreateZerglings]
{
[CreateUnit]
{
class = CCreateUnit;
[properties]
{
dir = dir;
Distance=0;
Unit=ScZergling;
}
water=1;
air=1;
underwater=1;
ground=1;
count=2;
}
}
Making it call, into the position defined by the custom explosion generator script, the "cheat" «.give count zergling».
That would allow us to create units by scripts.
And shouldn't be very hard to implement. Code for unit creation is already there of when we ".cheat" + ".give ArmCa"...
Posted: 08 Nov 2006, 03:00
by Sheekel
Caydr wrote:W00tzies

svecksy
Posted: 24 Mar 2007, 15:19
by Crampman
Sorry for rez this topic, but I think there is maby a little bug with the 'emit 2048+n'
If the weapon triggered by the script have a 'burst' tag, it seems that it is ignored.
Thx

Posted: 24 Mar 2007, 15:36
by KDR_11k
Yes but you can just repeatedly emit-sfx.