Can CEGTag be applied to debris?
Moderators: MR.D, Moderators
Can CEGTag be applied to debris?
Notice that when you have a severely killed unit that fragments, the fragments of the model emit particles. Can these be customized?
Not yet. Lurker said something about hard-coded FX issues, I put just about the whole "sm├â┬Ârg├â┬Ñsbord" of hard-coded stuff in front of him, hopefully he'll look into this and make it so that we can customize this... maybe (gasp) per unit. Not going to worry about any of it, until it actually happens.
In case you missed the changelog entry, this can now be
done using the new unit FBI tags pieceTrailCEGTag and
pieceTrailCEGRange (where Tag is a string and Range is
an integer). If Tag is given, each piece of an exploding
unit randomly loads one of <pieceTrailCEGRange> CEG's
whose tag starts with the prefix <pieceTrailCEGTag> and
ends with a number in the range [0, pieceTrailCEGRange - 1]:
If range is 1 (default) then you only need Fire0 defined,
otherwise all possible <pieceTrailCEGRange> tags are
expected to be valid.
done using the new unit FBI tags pieceTrailCEGTag and
pieceTrailCEGRange (where Tag is a string and Range is
an integer). If Tag is given, each piece of an exploding
unit randomly loads one of <pieceTrailCEGRange> CEG's
whose tag starts with the prefix <pieceTrailCEGTag> and
ends with a number in the range [0, pieceTrailCEGRange - 1]:
Code: Select all
// CEG definitions
[Fire0]
...
[Fire1]
...
[Fire2]
...
[Fire3]
...
Code: Select all
// unit FBI
pieceTrailCEGTag = "Fire";
pieceTrailCEGRange = 4;
otherwise all possible <pieceTrailCEGRange> tags are
expected to be valid.
Yeah, it seems the bitflags from COB do
not correspond to the actual flags used
by the projectiles. This is in CCobInstance:
Whereas this is in CPieceProjectile:
I'm tempted to equalize them, but that will
mean a lot of mods will have a lot of COB
scripts to edit. In the meantime, r4955
should work again (PP_CEGTrail has been
renamed to PP_NoCEGTrail and is now 64
for backward-compatibility).
not correspond to the actual flags used
by the projectiles. This is in CCobInstance:
Code: Select all
int newflags = 0;
if (flags & 2) newflags |= PP_Explode;
// if (flags & 4) newflags |= PP_Fall;
if ((flags & 8) && ph->particleSaturation<1) newflags |= PP_Smoke;
if ((flags & 16) && ph->particleSaturation<0.95f) newflags |= PP_Fire;
Code: Select all
const int PP_Fall = (1 << 0); // 1
const int PP_Smoke = (1 << 1); // 2
const int PP_Fire = (1 << 2); // 4
const int PP_Explode = (1 << 3); // 8
const int PP_CEGTrail = (1 << 4); // 16
mean a lot of mods will have a lot of COB
scripts to edit. In the meantime, r4955
should work again (PP_CEGTrail has been
renamed to PP_NoCEGTrail and is now 64
for backward-compatibility).
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Can CEGTag be applied to debris?
Can someone luaize this so it makes more sense to me?
Particularly the fire0, fire1, etc part.Kloot wrote:In case you missed the changelog entry, this can now be
done using the new unit FBI tags pieceTrailCEGTag and
pieceTrailCEGRange (where Tag is a string and Range is
an integer). If Tag is given, each piece of an exploding
unit randomly loads one of <pieceTrailCEGRange> CEG's
whose tag starts with the prefix <pieceTrailCEGTag> and
ends with a number in the range [0, pieceTrailCEGRange - 1]:
Code: Select all
// CEG definitions [Fire0] ... [Fire1] ... [Fire2] ... [Fire3] ...
If range is 1 (default) then you only need Fire0 defined,Code: Select all
// unit FBI pieceTrailCEGTag = "Fire"; pieceTrailCEGRange = 4;
otherwise all possible <pieceTrailCEGRange> tags are
expected to be valid.