limiting classes and vehicles

Suggestions from our community members for PR:BF2. Read the stickies before posting.
Post Reply
eggman
Retired PR Developer
Posts: 11721
Joined: 2005-12-27 04:52

limiting classes and vehicles

Post by eggman »

Hey Gents,

I came across this script:
http://bf2.fun-o-matic.org/index.php/Sc ... lass_Limit

Basically it prevents the use of certain vehicle class types. It does so by killing the player and the vehicle.

I was wondering if it's possible to extend the idea to compare a player class to a vehicle class.

So for example:
only engineers can operate armor
only SF can operate aircraft

Based on the script there, it looks like it wouldn't be too hard???

Perhaps it could be extended further to check rank levels of the player against specific vehicle types.

So for example:
Engineer Corporal or better to operate APC
Engineer Seargent or better to operate Tank

The goal would be that yer average support dude running around with an SAW can't jump into a helicopter... they have to spawn the appropriate class with that purpose in mind.

Personally I'd like this in PR, but not sure if other folks would.

egg
[COLOR=#007700][COLOR=DarkGreen]C[COLOR=Olive]heers!
egg[/COLOR][/COLOR][/COLOR]

Image
Tzefanya
Posts: 66
Joined: 2006-01-17 16:41

Post by Tzefanya »

The killing is a bit intense. My idea was to display a hud message to the person in the vehicle and start a bleed on them (like the out of area bleed) until they exit the vehicle. With the respawn times in PR, killing the player and the vehicle is a bit cruel.
Tzefanya: Protected by God
TheRealFritz
Retired PR Developer
Posts: 2316
Joined: 2005-10-28 19:44

Post by TheRealFritz »

I've run across this script a while back and have toyed with the idea. But I don't like the killing part. It's basically a crude hack :)
Image
Tzefanya
Posts: 66
Joined: 2006-01-17 16:41

Post by Tzefanya »

If we could discover a way to make a player exit a vehicle (in python); that'd be the ideal way to fix it. Just immediately kick them out. That's assuming there isn't a way to keep them from entering the vehicle.
Tzefanya: Protected by God
eggman
Retired PR Developer
Posts: 11721
Joined: 2005-12-27 04:52

Post by eggman »

Tzefanya wrote:The killing is a bit intense. My idea was to display a hud message to the person in the vehicle and start a bleed on them (like the out of area bleed) until they exit the vehicle. With the respawn times in PR, killing the player and the vehicle is a bit cruel.
Actually that's what it does if I read the script correctly. It just does it very rapidly... but the intensity of that can be controlled within the script (I think).

It also damages the vehicle which is a bad idea imo, but I blieve this can be changed as well.

I believe the relevant lines are here:
vehicle.setDamage(0.01)
body.setDamage(0.01)

Personally I'd remove vehicle.setDamage and experiment with body.setDamage to not kill the player instantly, but decrease their health at 10% a second or some such.

It also shows a message in the HUD which is currently along the lines of:
Oh noes %s!" % ( player.getName() "%s entered %s. Somebody set up us the bomb. Get out, QUICK!"

Hehe. It would be preferable to show a HUD message more like the center screen end of round messages, but not sure if that's possible.

Also I have no ide if you can compare player class to vehicle class.

This is avaialble:
vehicleType (armor, heli, aircraft)
and I am not sure about this:
vehicle.templateName

... the last one might mean what the mapper called it (eg: heli_cpawn_us_transportheli) or what the base object spawner template is (eg: USTHE_UH60). If it was the latter, then it would probably be pretty easy to extend it to be the more granular vehicle specific, not vehicle class specific.

Ther eis also a command:
player.getKit()

And you could compare results to vehicles in an allowed list and reduce health, or let the player operate depending on the results against the allowed pairs list.

Not sure about accessing rank levels within the game. Not sure it it would be desireable, but adding more granularity to the vehicle access control could be interesting.

egg
[COLOR=#007700][COLOR=DarkGreen]C[COLOR=Olive]heers!
egg[/COLOR][/COLOR][/COLOR]

Image
Tzefanya
Posts: 66
Joined: 2006-01-17 16:41

Post by Tzefanya »

It's definitely possible to compare a kit after they enter a vehicle and apply damage to them if they aren't allowed. The problem is that we don't really want to apply damage to them, we'd rather keep them from entering entirel, or kick them out immediately; neither of which seems to be possible from what we know. My thinking is that somehow sendClientCommand can be used to exit them from the vehicle, but perhaps I'm wrong. You could access their ranks also what what I can tell. Perhaps someone on the PRMM team could ask their EA representative about removing a player from a vehicle or entirely keeping them from entering one they aren't allowed in the first place.
Tzefanya: Protected by God
dawdler
Posts: 604
Joined: 2005-11-13 14:45

Post by dawdler »

Well the logical thing would be to simply kick people out the second they enter.

HOWEVER you run into some problems with multi-seat vehicles. For example, lets say that a new PR tank has 3 seats instead (driver/gunner/mg). That means *all* has to be engineers... Despite the fact you dont have to be an engineer to fire a machinegun. Same thing with the APC. There you cant even have this limitation - anyone has to be able to seat himself in the APC. Or the topside position in the AAV.
eggman
Retired PR Developer
Posts: 11721
Joined: 2005-12-27 04:52

Post by eggman »

dawdler wrote:Well the logical thing would be to simply kick people out the second they enter.

HOWEVER you run into some problems with multi-seat vehicles. For example, lets say that a new PR tank has 3 seats instead (driver/gunner/mg). That means *all* has to be engineers... Despite the fact you dont have to be an engineer to fire a machinegun. Same thing with the APC. There you cant even have this limitation - anyone has to be able to seat himself in the APC. Or the topside position in the AAV.
hehe .. excellent point lol.

d'oh!

not sure where to look to solve that.... gets complicated when you think about vehicle positions......

egg
[COLOR=#007700][COLOR=DarkGreen]C[COLOR=Olive]heers!
egg[/COLOR][/COLOR][/COLOR]

Image
F.N.G.
Posts: 145
Joined: 2006-01-03 02:15

Post by F.N.G. »

Well then, why don't you automatically move them to Position #2 or any empty one, if they do not have the appropriate kit?

You can prevent US players from entering MEC vehicles, so I wouldn't imagine there to be too big of a problem. Of course hummers/vodniks and such should be exempt.

I like the idea of not letting just anyone jump in any vehicle. But I don't think you should have a rank limit. Some people don't really care to much about rank and won't bother to use the ABR program to have rank in PR, so they will be excluded from trying vehicles, because they don't want to go point whoring. I don't like that at all. You should be able to experience all of PR, not be limited to just infantry.
Image
Free your mind, and your *** will follow.

F.N.G.
drygar
Posts: 203
Joined: 2005-07-17 10:01

Post by drygar »

eggman wrote:Hey Gents,

I came across this script:
http://bf2.fun-o-matic.org/index.php/Sc ... lass_Limit

Basically it prevents the use of certain vehicle class types. It does so by killing the player and the vehicle.

I was wondering if it's possible to extend the idea to compare a player class to a vehicle class.

So for example:
only engineers can operate armor
only SF can operate aircraft

Based on the script there, it looks like it wouldn't be too hard???

Perhaps it could be extended further to check rank levels of the player against specific vehicle types.

So for example:
Engineer Corporal or better to operate APC
Engineer Seargent or better to operate Tank

The goal would be that yer average support dude running around with an SAW can't jump into a helicopter... they have to spawn the appropriate class with that purpose in mind.

Personally I'd like this in PR, but not sure if other folks would.

egg
Nice idea Egg, keep the good work up!
dawdler
Posts: 604
Joined: 2005-11-13 14:45

Post by dawdler »

F.N.G. wrote:Well then, why don't you automatically move them to Position #2 or any empty one, if they do not have the appropriate kit?
Question is, can one do that? Not to sure python goes that deep as to move positions...

But anyway, I like the opposite idea better: Getting into a special seat gives you a new type of kit.

For example, if you are an assault and jump into a tank crewed by 2 people (manning the MG), you are still assault when you exit.

But if you enter the tank driver position, you become the "tank driver class" instead. Same thing with planes and whatever. That should teach people not to use vehicles at a whim as they will undoubtedly be crippled when they exit, but skips the hazzle of having a ton of selectable classes.
Post Reply

Return to “PR:BF2 Suggestions”