If possible, I (and most likely other people) would like a new CEG operator, OP_RADIUS. This would multiply the operand by the radius of the explosion. Also helpful would be a unit variable cegRadius and a COB constant CEG_RADIUS to get/set it.
As far as I can tell, the relevant files are:
rts\Sim\Projectiles\ExplosionGenerator.h
rts\Sim\Projectiles\ExplosionGenerator.cpp
The code that executes the CEG code.
rts\Sim\Units\Unit.h
rts\Sim\Units\Unit.cpp
To add the cegRadius variable.
rts\Sim\Units\COB\COBInstance.cpp
COB access to cegRadius.
We'd probably have to assign it a strange letter since 'r', 'a', 'd', 'i', and 's' are already taken. Maybe 'u'?
A wind ('w'?) and/or a gravity ('g'?) operator would also be nice, but radius is the most helpful since people generally want their explosions to match the radius of the weapon without having to define a separate explosion for each radius.
I should really figure out how to build Spring >_>... I did rewrite the wiki's CEG documentation at least.
New CEG Operator: OP_RADIUS
Moderator: Moderators
Re: New CEG Operator: OP_RADIUS
I think wind and gravity should be lumped into an operator along with direction (one op with different numbers selecting different components of different vectors). It's probably not the most intuitive way but at least it leaves us with more letters to work with in the future.
- Evil4Zerggin
- Posts: 557
- Joined: 16 May 2007, 06:34
Re: New CEG Operator: OP_RADIUS
So you're suggesting an operator, let's call it 'v' for the moment, such that, say, v0, v1, and v2 select the elements of dir, v3, v4, v5 select the elements of wind, and so on? I think that's a great idea--it would get past the problem that at current dir can only be used to specify an entire float3. In addition to saving letters, this would also allow multiplying dir by a scalar; for example, spawning CEGs on a line using CExpGenSpawner.
Re: New CEG Operator: OP_RADIUS
++++++++++++++++++++ +++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ ++++++
KDR's suggestion ftw.
KDR's suggestion ftw.
Re: New CEG Operator: OP_RADIUS
Unbroke forum by inserting spaces between your pluses.
Re: New CEG Operator: OP_RADIUS
Rather oddly placed spaces.