Page 1 of 1

Position of the point shots are created

Posted: 04 Feb 2006, 23:31
by zwzsg
It seems that TA use the position of the vertex 0 of the piece given by QueryX, while Spring use the position of the center of the piece given by QueryX. Someone confirm?

Posted: 05 Feb 2006, 21:54
by Argh
Interesting question. I've always used null points for the firepoint, because I didn't like the way OTA handled it otherwise- hiding/showing the flare is a seperate step.

While I'm randomly muttering... does anybody know how Spring hides flares? Does it just look for anything with "flare" in the name, or does it look for stuff that is hidden/shown during a fire animation?

Why do I wanna know? Because I need to show something during a fire animation, duh...

Posted: 06 Feb 2006, 00:08
by mongus

Code: Select all

Create()
	{
	hide rfire;
	hide lfire;

Code: Select all

FirePrimary()
	{
	if (gun == 0)
		{
		show rfire;
		sleep 100;
		hide rfire;
hm.. that argh?

you can place animations in the fireprimary.. and im almost (never done) you can use the wait-to-turn /move commads there..

that way you can "unhide" things in that part of the scprit, and animate them.

a question related to the scripts:

how you call the equivalent to "Fireprimary" but lets say for weapon 4?

its fireweapon4?

About what zwzsg is asking, just by looking how the game works i would say he is rigth, but cant tell for sure.

btw, didnt know vertex0 became the firepoint when a part was taken as the fire origin...

Posted: 06 Feb 2006, 00:24
by Argh
nonono... what I am wondering is how flares are being replaced with the fire/explosion animation, which looks kewl but is a very poor fit for certain things.

For example, I am going to make a flamethrower that is semi random and "persistant" for a moment, through scripting tricks, that will look cooler than the OpenGL colored alphamap technique being used now.

Short of having some sort of way to ... hmm... new topic... <goes off to write new topic>

Posted: 06 Feb 2006, 01:42
by mongus
yah, ive always wondered how, and what is possible, in the weapong making side of spring.

For instance, the very cool effect that happens around forcefields (plasma repulser) weapon.

Is that just inherithed from TA? or is new and how to take adv of it..?



But back on topic... no i dont know what zwzsg was questioning.. :D

Posted: 06 Feb 2006, 05:08
by Dragon45
The plasma repulser thing is hardcoded into the engine. No such unit exited for TA (well it did but it was all 3rd party and made only recently and all pretty hacky).

Posted: 06 Feb 2006, 19:26
by mongus
Im talking about the sfx that weapon has/ can make use of.

not the unit/weapon itself.

Posted: 06 Feb 2006, 19:48
by Archangel of Death
Argh: What I heard is it just looks for a hide piece; wait X; show piece; to determine where to do its flare stuff. Not sure it looks anywhere but in the fireweaponX() function though.
mongus wrote: a question related to the scripts:

how you call the equivalent to "Fireprimary" but lets say for weapon 4?

its fireweapon4?
Yes. And it is also strongly suggested by the SY to change Fire/Query/Aim/Aimfrom-Primary/Secondary/Tertiary to Weapon1/2/3 (respectively) as well if your going over 3 weapons. Its a "just don't test it" thing. Also, as it is becoming more and more that Spring units are less compatible with OTA (good thing, it means more power to the modder), at least some of the scripters (such as me) has taken to doing those replacements whenever we change a script.

Posted: 06 Feb 2006, 22:07
by mongus
put in more words, its

FirePrimary=>FireWeapon1
QueryPrimary=>QueryWeapon1
AimPrimary=>AimWeapon1
AimfromPrimary=>AimfromWeapon1

and so son for weapon2 +
Its a "just don't test it" thing
Im gessing that means, "just do it" :)

Just as a random note, it seems the flares controll, in some way, the ammount of smoke the shot generates.
(this was told to me by a moder, no first hand exp).

Also, argh was thinking more of what does spring "internally", to transform the flares (flare named parts in the object?) into smoke clouds,the timing of the clouds...
(well that is my guess).

See his post about that here.

Posted: 07 Feb 2006, 00:47
by Fnordia
The flare code checks if show-piece is called from a Fire* function. If so, it doesn't show the piece but instead creates our own muzzleflare effect.

This works fine for ota/xta stuff, so I guess it will probably stay that way. So right now if you want to avoid it, you could do something like this:

Code: Select all

ShowPrimaryPiece()
{
	show myotherpiece;
}

FirePrimary()
{
	show flare;
	call-script ShowPrimaryPiece();
	sleep 150;
	hide flare;
}
Also, you can mix FirePrimary and FireWeapon4 etc.. But if both FireSecondary and FireWeapon2 are present for example, FireWeapon2 will be used.

Posted: 07 Feb 2006, 01:28
by Argh
Aha! Thanks very much for that, I can now have guns that eject cartriges and have muzzle-flares of a custom kind :-)

Posted: 08 Feb 2006, 17:59
by zwzsg
I wonder if it is possible to eject cartridge without explosions: "explode cartdrige type FALL;" eject the cartdrige without explosion in TA, but in Spring the explosion is still there.

Posted: 10 Feb 2006, 04:36
by Argh
Tried FALL | DISAPPEAR ?

Posted: 10 Feb 2006, 21:56
by zwzsg
Are you making that one up? There is no "disappear" in exptype.h. Use emoticons when you're making jokes.

Posted: 11 Feb 2006, 01:26
by Argh
I wasn't joking. I really thought there was a DISAPPEAR case. :oops:

Soo... how's about this:

Code: Select all

explode BulletCasing type	FALL;
sleep 250;
hide BulletCasing;
That might do it... or close enough...

Posted: 11 Feb 2006, 19:45
by zwzsg
Get a clue!

What I was saying if that, unlike TA, there is an explosion even when no explosion GFX is specified.

In case you don't know, when you "explode" a piece, you lose all script control over the bit that is sent flying, and the piece that is "exploded" is hidden as well (save a few special cases in TA where it gets hidden as soon as the model refresh).

So that "hide BulletCasing;"
- Does not hide the explosion.
- Does not hide the BulletCasing sent flying.
- Does not hide the BulletCasing piece on the unit model because that one is already hidden.