Page 1 of 2

Remove FireArmsPosition

Posted: Mon Feb 21, 2011 3:24 pm
by Jeronimo
Short question: Is there a way to remove a FireArmsPosition, similar to how 'removeTemplate' undoes 'addTemplate'?

So that this code here

Code: Select all

ObjectTemplate.create HandFireArms Saiga12k
[...]
ObjectTemplate.addFireArmsPosition 0/0/0 1.25/-0.8/0
ObjectTemplate.addFireArmsPosition 0/0/0 0.5/-0.7/0
ObjectTemplate.addFireArmsPosition 0/0/0 -0.35/1.25/0
ObjectTemplate.addFireArmsPosition 0/0/0 0.4/0.26/0
ObjectTemplate.addFireArmsPosition 0/0/0 -0.22/1/0
ObjectTemplate.addFireArmsPosition 0/0/0 -1.5/0.35/0
ObjectTemplate.addFireArmsPosition 0/0/0 1/0.22/0
ObjectTemplate.addFireArmsPosition 0/0/0 0.01/0.01/0
is undone and the Saiga only shoots the main projectile at once?

Thx.

Re: Remove FireArmsPosition

Posted: Tue Feb 22, 2011 8:09 am
by Jeronimo
Ok, I solved this with

Code: Select all

ObjectTemplate.SetAsynchronyFire 1
This will let the bullets be fired one by one, cycling through all the FireArmsPosition.

I use this to shoot Fueldrums with the Saiga in DC_Final (SSM). Without it, it would fire 8 Fueldrums at once, now it's only one. Here's what happens when you put a bunch of them on a map and make them go boom :mrgreen: :

Image

Re: Remove FireArmsPosition

Posted: Tue Feb 22, 2011 1:59 pm
by fo0k
it looks like time has been speeded up a lot in this gif.. flag moving quick.. soldier idle is quick, trees moving.. :?:

dont understand..? epic bang though!

Re: Remove FireArmsPosition

Posted: Tue Feb 22, 2011 3:52 pm
by Jeronimo
Can't really say. I had around 0 to 1 FPS when doing this and hit PrintScreen quite a few times. Maybe it's because the timings of the tree moves are calculated some other way than those of the explosions, which results in this speed up effect when the grafics start to lag. :?

Posted: Tue Feb 22, 2011 7:46 pm
by freddy
i think its kinda cool like everything on speed

Re: Remove FireArmsPosition

Posted: Wed Feb 23, 2011 4:53 am
by Swaffy
Can you be a bit more clear on what you are asking?

If you mean "How do you make a single shotgun blast empty the clip?"
The you could either set the clip size to 1 or use this line [assuming the Saiga 12k has an 8 round clip]:
ObjectTemplate.setBlastAmmoCount 8

If you want to simply remove all of those FireArmsPosition lines, just put this around the body of text:

beginrem
[Body of text you want to "rem" out]
endrem

= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - =

I honestly see no point in using "AsynchronyFire 1" with the weapon when you could just set the MinDev [ObjectTemplate.setMinDev 2.7] to a larger number so that it's still inaccurate and save yourself the troubles. It will also save you space.

... Unless you have a reason why you want to do it that way ... ?

Re: Remove FireArmsPosition

Posted: Wed Feb 23, 2011 12:33 pm
by Jeronimo
The reasons are 1.: SSM and 2.: the spawner that I want to addTemplate to the projectile. There should only be one, not 8.

Well I could have rem'd these lines out in objects.rfa, but then it would be in all other maps, too, which I don't want. So as a serverside map mod, these lines should be undone.
But it doesn't matter, since nearly the same thing can be achieved with SetAsynchronyFire, which will lead to that only one projectile is fired, instead of 8 of them 9mm_Projectiles at once. => SOLVED.

Re: Remove FireArmsPosition

Posted: Thu Feb 24, 2011 4:17 am
by Iced Earth
You know what I always wanted to do?

Change the "cone" spray of the shotguns, or give the projectile a time to live, so either 1) The new spread would make the shotgun ineffective at long range (as it should), or 2) a time to live on the projectile, so they simply disappear after awhile.

OH, also, is it possible to have a gun fire two projectiles? Not two bullets, but two different proj's. This way you could have damage dropoff at range (Shoots two bullets, one does 75% dmg, other 25%, 25% bullet "disappears" after a hundred meters, other one keeps going).

Posted: Thu Feb 24, 2011 2:22 pm
by freddy
there is one neat little code for that, i use it often when i want to change damage without changing material values

Code: Select all

ObjectTemplate.minDamage 0.5
ObjectTemplate.distToStartLoseDamage 20
ObjectTemplate.distToMinDamage 40
if you want slightly more damage from a gun just give it a extra firearmsposition and the ObjectTemplate.setBlastAmmoCount 1 then balance it with the ObjectTemplate.minDamage

Re:

Posted: Thu Feb 24, 2011 7:54 pm
by Jeronimo
freddy wrote:ObjectTemplate.setBlastAmmoCount 1
Hmm... what does it do?