Remove FireArmsPosition

Ask questions, discuss ideas, get answers
Jeronimo
Posts: 196
Joined: Sun Dec 27, 2009 8:55 pm
Location: Germany
Contact:

Remove FireArmsPosition

Post 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.
Image
Jeronimo
Posts: 196
Joined: Sun Dec 27, 2009 8:55 pm
Location: Germany
Contact:

Re: Remove FireArmsPosition

Post 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
Image
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Remove FireArmsPosition

Post 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!
Jeronimo
Posts: 196
Joined: Sun Dec 27, 2009 8:55 pm
Location: Germany
Contact:

Re: Remove FireArmsPosition

Post 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. :?
Image
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

i think its kinda cool like everything on speed
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Remove FireArmsPosition

Post 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 ... ?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Jeronimo
Posts: 196
Joined: Sun Dec 27, 2009 8:55 pm
Location: Germany
Contact:

Re: Remove FireArmsPosition

Post 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.
Image
User avatar
Iced Earth
Posts: 209
Joined: Sun Oct 18, 2009 2:07 pm
Contact:

Re: Remove FireArmsPosition

Post 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).
Image
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post 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
Jeronimo
Posts: 196
Joined: Sun Dec 27, 2009 8:55 pm
Location: Germany
Contact:

Re:

Post by Jeronimo »

freddy wrote:ObjectTemplate.setBlastAmmoCount 1
Hmm... what does it do?
Image
Post Reply