Base captured, vehicles blow up and spawn new team vehicles?

Ask questions, discuss ideas, get answers
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Base captured, vehicles blow up and spawn new team vehicles?

Post by Swaffy »

- Allied team captures an Axis base with vehicles in it.
- Axis vehicles explode when the base is captured.
- Allied vehicles spawn.

I see it in BF: Bad Company 1 and 2, how the previous team's vehicles explode to spawn the new team's vehicles.

How can I do this?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Dennis|8749236
Posts: 239
Joined: Sun Nov 29, 2009 6:02 am
Location: Earth
Contact:

Re: Base captured, vehicles blow up and spawn new team vehic

Post by Dennis|8749236 »

i think is this code:
Object.IsSaveable boolean

in BF2 is
ObjectTemplate.isNotSaveable 1
What is the meaning of Life?? (Don't think about it!)
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Base captured, vehicles blow up and spawn new team vehic

Post by Apache Thunder »

8749236 wrote:i think is this code:
Object.IsSaveable boolean

in BF2 is
ObjectTemplate.isNotSaveable 1
None of those codes will do much of anything.

The best way I can think of is to set up a spawn for each control point. This spawn would spawn a invisible PCO that would have a death bubble on it. The PCO would have a short lifespan of about 10 seconds or less but no less then 2 seconds to ensure it works properly. The PCO would have a death bubble on it that is team specific and effects all vehicles in the area of the control point. If the CP changes teams, then the old PCO would soon die and be replaced by the other team's PCO with corresponding death bubble to wipe out the previous team's vehicles. ;)
ImageImageImage
I have cameras in your head!
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Base captured, vehicles blow up and spawn new team vehic

Post by fo0k »

What if you get into an opposing teams vehicle at their base before your team mate then caps it? Would it not blow you up too?
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Base captured, vehicles blow up and spawn new team vehic

Post by Apache Thunder »

Death bubbles are team specific I believe. The team status of a vehicle may change if a different team member then what the vehicle original spawned as entered it. Thus it shouldn't present a issue. I don't recall having any problems driving a T72 onto the repair pad on the old clan server I used to play on years ago. (they had server side death bubbles on the repair pads to stop camping in the bases)

But my coding theory should be tested to be sure. But I'm sure the team status of a vehicle is updated regardless of it's spawn settings once a player enters it. :)
ImageImageImage
I have cameras in your head!
User avatar
Dennis|8749236
Posts: 239
Joined: Sun Nov 29, 2009 6:02 am
Location: Earth
Contact:

Re: Base captured, vehicles blow up and spawn new team vehic

Post by Dennis|8749236 »

i think the death bubble should works good, but if other vehicle went onto that bubble, that vehicle may explode too..
But, i have found a problem in Server, many server use death bubble to prevent Base Camping or raping, if a player use a vehicle to enter that radius, the player will die but the vehicle will stay there and cannot be used(if u enter it u will die immediatly), but it still have collision physics..
What is the meaning of Life?? (Don't think about it!)
User avatar
archer
Posts: 54
Joined: Fri Feb 05, 2010 4:40 pm
Location: Übertów
Contact:

Re: Base captured, vehicles blow up and spawn new team vehic

Post by archer »

Instead of a "death bubble" SupplyDepot you can set your invisible PCO to cause a huge ExplosionDamage (like 9999) in a very small ExplosionRadius (like 0.2.) Use either TimeToLive or CriticalDamage to make it die as soon as it spawns and make it spawn on exactly same coordinates as the target vehicle. Still, this will kill anyone who happens to stand exactly at the spawner coordinates at the time of capture, but you can experiment with ExplosionRadius to minimize the risk.
dzn.battlefield.pl - my Bf1942 modding website
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Base captured, vehicles blow up and spawn new team vehic

Post by Apache Thunder »

Code: Select all

ObjectTemplate.explosionMaterial
This code can be used to define custom damage that a PCO's explosion will cause. Similar to the Material2 command for projectiles. It overrides the explosionDamage setting (thus it should be left undefined if the above code is used) and the damage system is then used to define what amount of damage the PCO's explosion will cause to which vehicles with certain materials. So you can just as easily give the PCO a custom explosion material that only effects vehicles. The problem with this is, that it's not team specific in any circumstance. It will kill all vehicles with the matching materials as defined in the damage system regardless of the team status of the vehicle.

Thus, I do not recommend this method of exploding PCOs to clear out control point vehicles.
ImageImageImage
I have cameras in your head!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Base captured, vehicles blow up and spawn new team vehic

Post by Swaffy »

In short, it's another idea that would take twenty butt loads of work to look nice and work.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
motoko
Posts: 217
Joined: Sun Nov 21, 2010 8:43 pm
Location: Dante's 6th Pit of Hell

Re: Base captured, vehicles blow up and spawn new team vehic

Post by motoko »

8749236 wrote:Object.IsSaveable boolean
You can use a Boolean with the Engine?
Post Reply