A gun shooting cars in BFV

Until this forum becomes busy just include BF2, 2142 or BFV in the title

A gun shooting cars in BFV

Postby SLAG » Fri Dec 10, 2010 10:59 am

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.)
SLAG
 
Posts: 1
Joined: Fri Dec 10, 2010 10:51 am

Re: A gun shooting cars in BFV

Postby Swaffy » Wed Feb 16, 2011 2:26 am

Just add an object spawner to the projectile ... that's what I do in BF1942. I'm sure it'll work in BF2.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Image
User avatar
Swaffy
 
Posts: 1710
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: A gun shooting cars in BFV

Postby newmodder 17 » Sun Mar 13, 2011 8:34 pm

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

Re: A gun shooting cars in BFV

Postby Apache Thunder » Sun Mar 13, 2011 9:16 pm

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.
ImageImageImage

I have cameras in your head!
User avatar
Apache Thunder
 
Posts: 1192
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA

Re: A gun shooting cars in BFV

Postby newmodder 17 » Sun Mar 13, 2011 9:30 pm

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

Re: A gun shooting cars in BFV

Postby newmodder 17 » Sun Mar 13, 2011 9:33 pm

y is there no copy and paste in winRFA files? thts unfortunate
newmodder 17
 
Posts: 5
Joined: Sun Mar 13, 2011 8:30 pm

Re: A gun shooting cars in BFV

Postby newmodder 17 » Sun Mar 13, 2011 9:39 pm

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
newmodder 17
 
Posts: 5
Joined: Sun Mar 13, 2011 8:30 pm

Re: A gun shooting cars in BFV

Postby motoko » Sun Mar 13, 2011 11:35 pm

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.
User avatar
motoko
 
Posts: 217
Joined: Sun Nov 21, 2010 8:43 pm
Location: Dante's 6th Pit of Hell

Re: A gun shooting cars in BFV

Postby Nunya » Wed Apr 06, 2011 6:30 pm

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..
Nunya
 
Posts: 2
Joined: Sat Feb 20, 2010 3:29 am
Location: ind state


Return to Battlefield 2, 2142 and Vietnam Discussion

Who is online

Users browsing this forum: No registered users and 9 guests

cron