Deathbubbles dead vehicles problem

Lots of cool and useful tips to mod either serverside or clientside

Deathbubbles dead vehicles problem

Postby freddy » Mon Dec 17, 2012 6:36 pm

I have experimenting some with deathbubbles and the problem with them leaving dead vehicles behind. I cant say for sure this works but it looks promising in the tests iwé done.

Anyway, the change that seems to work best is to simply put in a fixed damage value for a vehicle instead of the unlimited value

So if the code usually is something like this
Code: Select all
ObjectTemplate.addVehicleType zero -1 -10 0

Then make it limited instead
Code: Select all
ObjectTemplate.addVehicleType zero 5 -10 0


Im not really sure how a supply bubble works because it will not totally stop dealing out damage after the -10 or the limit at 5, but it stops briefly and then chunk away another -10 again, maybe this pauses is enough to prevent leaving dead vehicles hanging.

Vid from testing, the zeros have the zero -1 -xx 0 for reference, and the aichis have the limited code, i havent tried this "live" in a populated server, it needs more testing to be sure if it works or not
User avatar
freddy
 
Posts: 1242
Joined: Sun Oct 18, 2009 4:58 pm

Re: Deathbubbles dead vehicles problem

Postby fo0k » Tue Dec 18, 2012 11:19 pm

This only happens when there is a player in there. so a solution I think i tried but for sure should work.. was to use a secondary bubble to kill the player before vehicle dies. this is the (perhaps 'a') key factor.. player has to go first.

if vehicle health = 5 (death imminent) then show damage effect (a deathbubble template appears at 0/0/0) on vehicle... which is setup to kill the player (tiny radius required) a brief moment before the vehicle dies.

That said, your solution is strange how it handles those near death values but great if its stable!
User avatar
fo0k
 
Posts: 1423
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Deathbubbles dead vehicles problem

Postby freddy » Wed Dec 19, 2012 12:29 am

I like your solution better, the problem i had was how to get a deathbubble to affect a player inside a vehicle only and not nessesary the vehicle itself
User avatar
freddy
 
Posts: 1242
Joined: Sun Oct 18, 2009 4:58 pm

Re: Deathbubbles dead vehicles problem

Postby fo0k » Wed Dec 19, 2012 1:15 am

hmm.. is this why i only half remember trying this?

ObjectTemplate.workOnVehicles 0
ObjectTemplate.workOnSoldiers 1


not as simple as that..?
User avatar
fo0k
 
Posts: 1423
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Deathbubbles dead vehicles problem

Postby Senshi » Wed Dec 19, 2012 9:57 am

I thought soldiers became "part" of the vehicle in BF42. Only in BFV and BF2 that changed properly. This is also why you can't get passengers to use their own weapons in BF42.
User avatar
Senshi
 
Posts: 695
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany

Re: Deathbubbles dead vehicles problem

Postby freddy » Thu Dec 20, 2012 1:16 am

Yes thats true, the player gets "shielded" from a external bubble, if the bubble is added to the vehicle itself, then it affects the player.
User avatar
freddy
 
Posts: 1242
Joined: Sun Oct 18, 2009 4:58 pm

Re: Deathbubbles dead vehicles problem

Postby freddy » Fri Feb 08, 2013 12:02 pm

I had another go at this, it is like you cant let the vehicle be killed by the bubble no matter what so here is a way around it. Its not perfect as you can see but its the only relyable way i could make it work. Tested it as SSM mod

Code: Select all
ObjectTemplate.addVehicleType Kubelwagen 0 -7 0
ObjectTemplate.addVehicleType Willy 0 -7 0
ObjectTemplate.addVehicleType panzeriv 0 -9 0
ObjectTemplate.addVehicleType Tiger 0 -9 0
ObjectTemplate.addVehicleType sherman 0 -9 0
ObjectTemplate.addVehicleType m10 0 -9 0


Code: Select all
ObjectTemplate.Active Kubelwagen
ObjectTemplate.criticalDamage 8
ObjectTemplate.hpLostWhileCriticalDamage 999

ObjectTemplate.Active Willy
ObjectTemplate.criticalDamage 8
ObjectTemplate.hpLostWhileCriticalDamage 999

ObjectTemplate.Active sherman
ObjectTemplate.criticalDamage 18
ObjectTemplate.hpLostWhileCriticalDamage 999

ObjectTemplate.Active panzeriv
ObjectTemplate.criticalDamage 18
ObjectTemplate.hpLostWhileCriticalDamage 999

ObjectTemplate.Active m10
ObjectTemplate.criticalDamage 18
ObjectTemplate.hpLostWhileCriticalDamage 999

ObjectTemplate.Active Tiger
ObjectTemplate.criticalDamage 18
ObjectTemplate.hpLostWhileCriticalDamage 999


I had some other code active to in this vid thats why the wreck takes off

User avatar
freddy
 
Posts: 1242
Joined: Sun Oct 18, 2009 4:58 pm


Return to General Modding Tutorials

Who is online

Users browsing this forum: Google [Bot] and 15 guests