In the arm_commander script (for the XTA mod) there is a line:
emit-sfx 1024 + 1 from nanospray;
I'm looking for information on "1024 + 1" and other codes like it.
I have been searching without any luck and do not know where this information is defined, or how it is defined.
I know that the command tells the script to emit a graphic effect from the nanospray, but beyond that I'm lost.
Any help would be greatly welcome.
Scripting / sfx question
Moderator: Moderators
Re: Scripting / sfx question
That 1024+1 does, indeed, refer to an Explosion event. Here's an example from a P.U.R.E. unit:
1024+1, therefore, refers to MED_EXPLOSION_FX2.
I usually write my BOS script sections dealing with that like this:
#define MED_EXPLOSION_FX2 1024+1
So that, from there on out, all references to MED_EXPLOSION_FX2 in the BOS are the same as the FBI. Keeps maintenance simpler.
Code: Select all
[SFXTypes]
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////RESERVED
explosiongenerator0=custom:SMOKEPUFF_PURE_FX;
explosiongenerator1=custom:MED_EXPLOSION_FX2;
explosiongenerator2=custom:ROCKET_ARTY_EXPLOSION_FX;
explosiongenerator3=custom:MED_EXPLOSION_FX;
explosiongenerator4=custom:GUNCRAFT_EXPLOSION_FX;
explosiongenerator5=custom:BIG_EXPLOSION_FX;
explosiongenerator6=custom:BIG_EXPLOSION_FX;
explosiongenerator7=custom:BIG_EXPLOSION_FX;
explosiongenerator8=custom:BIG_EXPLOSION_FX;
explosiongenerator9=custom:BUILDING_DUST_FX;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////END RESERVED
////////////////////////////////////////////////////////////////////////////////////FX
explosiongenerator10=custom:GUNFLARE_RAPID_RED;
}
I usually write my BOS script sections dealing with that like this:
#define MED_EXPLOSION_FX2 1024+1
So that, from there on out, all references to MED_EXPLOSION_FX2 in the BOS are the same as the FBI. Keeps maintenance simpler.
Re: Scripting / sfx question
1024 does the explosion effect at a certain piece.
2048 fire a weapon at a certain piece (it's just blindfired, no control over aiming/whatnot by itself, but it does obey selfdamage rules).
4096 does the explosion at a certain piece (this is a real explosion with damage, but does NOT obey selfdamage rules).
2048 fire a weapon at a certain piece (it's just blindfired, no control over aiming/whatnot by itself, but it does obey selfdamage rules).
4096 does the explosion at a certain piece (this is a real explosion with damage, but does NOT obey selfdamage rules).
-
- Posts: 1176
- Joined: 23 Aug 2007, 19:46
Re: Scripting / sfx question
It's also in the Wiki:
http://spring.clan-sy.com/wiki/COB_Constants
I also have a question at this point:
I tried to let a bomber with a "manual" bomb weapon drop its bombs sooner than the auto calculation via gravity & stuff defines. For that I used a dummy weapon which had a bigger range but it didn't really work so is there a problem with those customized bomb weapons or even burst weapons?
My problem was that I couldn't make it fire more than once and when just calling the emit-sfx line for several times I got several bombs but they didn't obey things like the weapon firing with a small inaccuracy ( so the bombs don't drop in a line but are spread a bit) and just spawned at the exact same place...
I had a look at how CA does handle their laser bombers for example but couldn't come up with any difference besides the different weapon type...
http://spring.clan-sy.com/wiki/COB_Constants
I also have a question at this point:
I tried to let a bomber with a "manual" bomb weapon drop its bombs sooner than the auto calculation via gravity & stuff defines. For that I used a dummy weapon which had a bigger range but it didn't really work so is there a problem with those customized bomb weapons or even burst weapons?
My problem was that I couldn't make it fire more than once and when just calling the emit-sfx line for several times I got several bombs but they didn't obey things like the weapon firing with a small inaccuracy ( so the bombs don't drop in a line but are spread a bit) and just spawned at the exact same place...
I had a look at how CA does handle their laser bombers for example but couldn't come up with any difference besides the different weapon type...
Re: Scripting / sfx question
No, they just don't obey the range parameter, and fire automatically when the range / gravity algorithm says that they should. You can make a bomb a slave to another weapon, to make it fire under different conditions, if you need to solve that problem.is there a problem with those customized bomb weapons
Ok... now I've really, really gotta go...
- Runecrafter
- Posts: 148
- Joined: 30 Oct 2005, 00:23
Re: Scripting / sfx question
Thank you all, you have been most helpful. 

-
- Posts: 1176
- Joined: 23 Aug 2007, 19:46
Re: Scripting / sfx question
You didn't get what my point was. It's not about triggering the weapon earlier (as I've done that with another weapon) but that when the bombs get triggered it doesn't act like it's defined in the script. For each emit-sfx call I just get one single bomb which gets emitted right at the queried object piece. This also makes it impossible to fake the "burst" of the weapon by just calling the emit-fx order for several times because the bombs just spawn at the exact same place and aren't spread a bit like they should...Argh wrote:No, they just don't obey the range parameter, and fire automatically when the range / gravity algorithm says that they should. You can make a bomb a slave to another weapon, to make it fire under different conditions, if you need to solve that problem.
Re: Scripting / sfx question
so move the pieces around.