Page 1 of 2

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

Posted: Tue Mar 29, 2011 12:20 am
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?

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

Posted: Tue Mar 29, 2011 4:03 pm
by Dennis|8749236
i think is this code:
Object.IsSaveable boolean

in BF2 is
ObjectTemplate.isNotSaveable 1

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

Posted: Wed Mar 30, 2011 3:16 pm
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. ;)

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

Posted: Wed Mar 30, 2011 4:47 pm
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?

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

Posted: Wed Mar 30, 2011 5:23 pm
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. :)

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

Posted: Wed Mar 30, 2011 8:12 pm
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..

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

Posted: Wed Mar 30, 2011 9:17 pm
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.

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

Posted: Thu Mar 31, 2011 3:25 am
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.

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

Posted: Fri Apr 01, 2011 3:28 am
by Swaffy
In short, it's another idea that would take twenty butt loads of work to look nice and work.

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

Posted: Fri Apr 01, 2011 7:00 am
by motoko
8749236 wrote:Object.IsSaveable boolean
You can use a Boolean with the Engine?