Page 1 of 1
The two main guns trick!
Posted: Wed Jan 12, 2011 9:01 pm
by TopoSolitario
free gif maker
So, here it is... the two main guns trick:
1. Your FIRE animation should look like this in the unit.txt
Code: Select all
[FIRE00]
FRM 0 20
FX 0 0
FX 4 0
SFX 1 43
SFX 5 43
CALL 2 0 2
Note that you play two times the same FX in your animation, one in frame 0 and second in frame 4.
2. As you only have one #!0 object for the FX in your MAX model... add a key in frame 0 on the muzzle of the first gun, and then on frame 4 move it to the muzzle of the second gun...
It works outstanding for guns, machineguns, rockets and whatever you need
Put the FX in consecutive frames and the effect is almost invisible!
Ingame, the two guns should mean more accuracy for this little BasterdJäger :p
Posted: Wed Jan 12, 2011 10:51 pm
by TopoSolitario
Thinking about the animation file... I've a question!!
The CALL line is the call to the unit's custom_trigger (in "trigger.bsf"). Currently the custom trigger ONLY draws tracers from the emmiter and only if the passed first parameter equals zero (CALL <frame> <param> <param> <param>)...
So, if we have a look at the Churchil file:
Code: Select all
[MGFIRE00]
FRM 180 200 //From frame 180 to frame 200
FX 2 1 //At 182 we start showing machinegun fire
FX 12 0 //At 192 we fire the main gun
SFX 0 29 118 119 //Sound at 0 for the machineguns
SFX 12 43 //Sound at 12 for the main gun
CALL 2 0 2
CALL 6 1 2
CALL 9 1 2
CALL 11 1 2
So, why are the calls made for? If I'm correct (probably not):
- the first CALL 2 0 2 draws one and only one tracer from the first emmiter at frame 2... as there is no third parameter the emiter can or cannot be the main gun.
- next calls at frames 6 9 and 11 just do nothing as a "1" means no tracer, and custom_trigger does nothing else...
So... WHY using the CALLs if we don't do anything? I'm lost!
PS: In the animated GIF above you can see the tracer from the CALL 2 0 2 at the second frame (two frames after the flash) :p
Posted: Thu Jan 13, 2011 11:56 am
by IainMcNeil
Now that's cool - asking Richard about the CALL because I dont use the unit files so not sure what they mean.
Posted: Thu Jan 13, 2011 5:18 pm
by Merr
That is cool! You're breaking new ground Topo!
I see what you're trying to do ... make a tracer for that right gun (as I can see only one come out the left gun)...
What if you made another [FIRE01] ... using the 01 emmiter for the 2nd gun ... using the same tags as [FIRE00] ??
I don't know this stuff ... just an uneducated guess ...
Pip ?? I think Richards forum name is "TwoEyes" ?
Posted: Thu Jan 13, 2011 5:50 pm
by pipfromslitherine
The tying together of the emitters and the FX is pretty arcane to be honest. This is a pretty clever way of doing it until we get the particle editor polished up so that people can use it sensibly.
I'm not sure about the call stuff - now I reread it it seems a little confused. It's using a as both the command, but then passing it in as the emitter, it might be a little broken...
Cheers
Pip
Posted: Thu Jan 13, 2011 7:17 pm
by TopoSolitario
I like the effect pruduced just moving in the animation FX object #!0 to each muzzle... it is a extremely fast change, and the minimun delay makes it more spectacular than just invoking the same effect at the same time.
Anyway... If I want tracers in both guns the way is this:
Code: Select all
[FIRE00]
FRM 0 20
FX 0 0 // main gun
FX 4 0
SFX 1 43
SFX 5 43
CALL 2 0 2
CALL 6 0 2
Actually all you have to do is ensure that #!0 is at the right place on frames 2 and 6
But there is something wrong as you can't use other emmiter than 0 (main gun) if you use other emmiter (1,2..) the IF in custom_trigger doesn't iterates... so... no tracer.
I think it is a bug, or something overseen while finishing the game... solution is easy, just modify custom_triger to allways show tracer and use accurately the right emmiter... anyway it is a less than minor bug... I don't really see tracers as much important for other units different from infantry with rifles... the rest has enough muzzle flash!
