Page 1 of 1

A gun shooting cars in BFV

Posted: Fri Dec 10, 2010 10:59 am
by SLAG
Hey.

I'm abit new to modding i have made some funny stuff, but i need some help. I have plans on making the LAW rocket luncher to shoot cars, like mutt or something like that. i got it to work one time, but then it crached. the changes i made was, change the projectile to "Mutt" and velocity to "120", i think i need to change the projectile position from 0/0/0 to something else, PLEASE HELP! :?

Thanks! :D

(P.S. i use winRFA soo, if some one going to help me, then send me the code.)

Re: A gun shooting cars in BFV

Posted: Wed Feb 16, 2011 2:26 am
by Swaffy
Just add an object spawner to the projectile ... that's what I do in BF1942. I'm sure it'll work in BF2.

Re: A gun shooting cars in BFV

Posted: Sun Mar 13, 2011 8:34 pm
by newmodder 17
how exactly do u even add an object spawner to the projectile? i can change projectile but adding something? :?

Re: A gun shooting cars in BFV

Posted: Sun Mar 13, 2011 9:16 pm
by Apache Thunder
First off, is this a server side mod or a client side mod? (if you are making a new mod that has this, then this is a client side mod)

If client side mod, go to the objects rfa, find the vehicle that fires the projectile you need the jeep on, then look up what projectile it fires. Some vehicles include the projectile in the weapons.con file but other times they are included in a common file for a vehicle class or type.

Once you find that projectile, simply create a spawner like you see on a map, then addTemplate it to the projectile:

Code: Select all

ObjectTemplate.addTemplate (Name of your spawner)
It's as simple as that.

Swaffy wrote:Just add an object spawner to the projectile ... that's what I do in BF1942. I'm sure it'll work in BF2.
He is asking about this in BFV not BF2. But nonetheless it is the same through out. The object spawner code only really has a few new commands in BF2 and addTemplates are handled the same way. the differences are even less in BFV. BFV is basically an upgraded BF1942 engine with a few extra quirks added in.

Re: A gun shooting cars in BFV

Posted: Sun Mar 13, 2011 9:30 pm
by newmodder 17
thx guys and yea sorry bout pming and posting ive been trying to figure it out all day and was imapatiant

Re: A gun shooting cars in BFV

Posted: Sun Mar 13, 2011 9:33 pm
by newmodder 17
y is there no copy and paste in winRFA files? thts unfortunate

Re: A gun shooting cars in BFV

Posted: Sun Mar 13, 2011 9:39 pm
by newmodder 17
i just found the tools for modding today so i cant follow most of it. i can swap bullets for guns add damage mes with timing all that but say i wanted to make a m9 shoot t72's how would i start and wat do i do ect

Re: A gun shooting cars in BFV

Posted: Sun Mar 13, 2011 11:35 pm
by motoko
newmodder 17 wrote:i just found the tools for modding today so i cant follow most of it. i can swap bullets for guns add damage mes with timing all that but say i wanted to make a m9 shoot t72's how would i start and wat do i do ect
T72 Shells? Or... The T72Spawner?

For shells you would use:

Code: Select all

ObjectTemplate.active TT33
ObjectTemplate.projectileTemplate T72Projectile 
If you want to use the pistol to spawn a spawner, there's this post on the SSM back up by PLAYER.
PLAYER wrote:That's what I had presumed as well, till i tried it..

With Hold Object set to 1 the PCO followed the projectile.. using same method but with the tracer the object just spawned in front of the weapon..

In the following the Zero Fires out with the velocity of the Knife Projectile.
Code:
ObjectTemplate.create ObjectSpawner LightTankSpawner
ObjectTemplate.setObjectTemplate 2 Zero
ObjectTemplate.setObjectTemplate 1 Zero
ObjectTemplate.MinSpawnDelay 999
ObjectTemplate.MaxSpawnDelay 999
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 45
ObjectTemplate.Distance 40
ObjectTemplate.DamageWhenLost 10
ObjectTemplate.holdObject 1
ObjectTemplate.CreatNotInGrid 1
ObjectTemplate.setTeam 1

ObjectTemplate.active KnifeAllies
ObjectTemplate.addFireArmsPosition 0/0/0 0/0/0
ObjectTemplate.velocity 100

ObjectTemplate.Active KnifeProjectile
ObjectTemplate.timeToLive CRD_NONE/20/0/0
ObjectTemplate.addTemplate LightTankSpawner
ObjectTemplate.SetPosition 0/0/5


Using the same spawner and this code, the Zero just spawns in front with 0 velocity.. which seems odd to me.

Code:
ObjectTemplate.active KnifeAllies
ObjectTemplate.projectileTemplate KnifeProjectile
ObjectTemplate.setTracerTemplate LightTankSpawner CRD_NONE/10/0/0


Shouldn't it work the same? Doesn't seem to. When i remove the Hold Object the Zero still has 0 velocity when exiting the weapon, but it now has the expected gravity effect and falls to the ground.

The code I'm discussing is BF1942 not BFV. Although it's been said to work in BFV as well.

Re: A gun shooting cars in BFV

Posted: Wed Apr 06, 2011 6:30 pm
by Nunya
SLAG wrote:Hey.

I'm abit new to modding i have made some funny stuff, but i need some help. I have plans on making the LAW rocket luncher to shoot cars, like mutt or something like that. i got it to work one time, but then it crached. the changes i made was, change the projectile to "Mutt" and velocity to "120", i think i need to change the projectile position from 0/0/0 to something else, PLEASE HELP! :?

Thanks! :D

(P.S. i use winRFA soo, if some one going to help me, then send me the code.)
rem ***CarNader Launcher***
ObjectTemplate.Active M203
ObjectTemplate.projectileTemplate fueldrumProjectile / <<<or. name it anything car.. plane tank etc..

rem ***CarNader Launcher***
ObjectTemplate.Active AK47GP30
ObjectTemplate.projectileTemplate fueldrumProjectile /<<<or. name it anything car.. plane tank etc..