Page 1 of 1

ground decals and stuff

Posted: 14 Jun 2007, 14:29
by Zpock
When making the unit death scripts, it would be nice if one could somehow customize what effects are used for the flying pieces, currently you can only change the smoke/fire bitmaps for the whole mod (I think). This would be useful for making gory stuff, like mutilated arms spraying blood when flying, and to get more variation in general. The best would of course be if it could be done on a script basis, berhaps the "| BITMAP1" thing that seems to be unused today, or some GET/SET trickery could be even better. Failing all else, a simple FBI tag might do.

The second thing is that it would be nice to be able to create ground decals, both for the piece landing, and directly from the script. This would obviously be useful for, again, blood. Also to make more neat footsteps for big units with elaborate walking scripts, etc.

Posted: 14 Jun 2007, 16:29
by AF
Instead, on the brink of death, the unit can spawn blood sfx, shoot weapons that have arm models but do no damage, fire weapons at the ground that have decals associated with their explosions.

Posted: 14 Jun 2007, 18:58
by KDR_11k
I just remove the sprite (replace with null image) and use a custom explo gen when needed.

Posted: 14 Jun 2007, 20:59
by Zpock
Explosion generater attached to projectiles would be handy.

How do you fire weapons in the script?

Posted: 14 Jun 2007, 21:15
by Guessmyname
emit-sfx somethingorother... - the choices are:

1024 (+0-15)
2048 (+0-15)
4098 (+0-15)

One of them emits a custom fx, one explodes the weapon at the piece it's emitted from, and another fires the weapon. The problem is that I can never remember which is which...

Posted: 14 Jun 2007, 21:55
by Peet
script-fired weapon is 2048

Posted: 14 Jun 2007, 22:09
by Guessmyname
I'm fairly certain 1028 is sfx

Posted: 14 Jun 2007, 22:22
by Peet
Guessmyname wrote:I'm fairly certain 1028 is sfx
1024. Learn your powers of 2 :P

Posted: 14 Jun 2007, 22:44
by Guessmyname
oops

EDIT: I got it right the first time!

Posted: 15 Jun 2007, 11:40
by KDR_11k
1024 is explo gen
2048 is force fire
4096 spawns the explosion of the given weapon.

Posted: 15 Jun 2007, 15:50
by rattle
There are a couple of threads about it and it's all in the changelog by the way.
- Calling emit-sfx 2048 from a script will now allways fire the weapon. Emit-sfx 4096 will now take over the previous behavior of detonating the weapon at the piece position.

- Added the abillity to call explosiongenerators and weaponfire from within script via emit-sfx command.
Explosiongenerators to be called via script are defined in the unit TDF file in a section called SFXTypes, with tags explosiongenerator+n=some_explosion
and then called via emit-sfx 1024+n.
Weaponfire are called via emit-sfx 2048+weapon_to_fire.