Jump to content
Official BF Editor Forums

Bf2142 Sentry Gun Unlock - Shooting Through Walls - Fix


Recommended Posts

Problem: in BF2142, there is a Sentry Gun unlock for the Support class, ala the sentry gun in "Alien", that pans horizontally 90 degrees back and forth looking for players, and if spotted, shoots a steady stream at them. As far as I can tell, there is no panning vertically. The primary problem is, the bullets sometimes stream right through walls, sometimes not. The secondary problem is, of much less concern to me, is that the gun ignores walls or wall clipping when spotting enemies (reminds me of an old Pacman game clone I wrote, where my monsters did the same thing, ignoring the walls, because I cheated and used a quick simplified math equation to give them intelligence (is pacman higher or lower than me on the screen pixel count (numbered top to bottom, left to right), go that direction) instead of programming some logic to simulate their line of sight).

I'm wondering if anyone has bothered to even attempt to fix this yet. I've got a lot of complaints that this is the #1 thing I should be fixing, and indeed, the Support Sentry gun is quite happy to ignore walls and track players behind them, shoot right through the walls. I've even seen it shooting from inside the titan, through the walls, outside the titan in a steady stream of bullets.

Without getting into the .tweak file yet... I'm thinking...

a. Maybe the bullet speed is set too high? Therefore, its adding to much distance to the bullet travel, and by the time it tests for a bullet collision, its already through the wall?

b. Perhaps this could be fixed, if that is it (or not it), by changing the projectile type from the Sentry gun one, to some other simlar bullet type... say... the one for the default handheld support M60 type machine gun. At least, that would be the first thing I would try...

Edited by cobrachoppergirl
Link to comment
Share on other sites

Hmm, velocity isn't it, as the MG is twice as fast and doesn't go through the walls at all, and the material isn't it, because they are both 27....

Its probably something to do with the titan model, an incorrect setting on some of the interior walls... or some inherent flaw in the sentry gun driven by ai...

Edited by cobrachoppergirl
Link to comment
Share on other sites

Well, this is irritating, I switch to another bullet... not sure if its not going through walls, but its not causing any damage to me... when it goes bezerk and shoots me... unlike the stock one, which does... :-/

rem CHOPPERGIRL - change this to see if we can switch to some other preexiting predefined bullet that does not pass through walls.
rem ObjectTemplate.create GenericProjectile eu_SentryGun_FireArm_Projectile
ObjectTemplate.create GenericProjectile eu_mg_stationary_Projectile
rem ObjectTemplate.create GenericProjectile unl_hmg_stationary_Projectile

Link to comment
Share on other sites

Devilman passed me some code....




weaponTemplate.setFiresThroughTransparent 1


weaponTemplate.setFiresThroughTransparent 0

So far it looks like it helps somewhat decrease the number of walls the sentry gun passes through. Oddly, you will still see the bullet passing through some walls and ricocheting off walls behind walls they shouldn't, but there is no bullet damage. You can stand in this stream and not get hurt behind the first wall.

My perception is the visual effect of the bullet tracer and ricohet is still there, but not the damage, though this could be just my unscientific perception. There could be no change at all, maybe they did this before.

My observation is that this change certainly doesn't make things worse, doesn't break anything, and though it doesn't completely fix the problem, my perception is it improves the situation with the sentry gun, or can only improve the situation by (when it works) decreasing damage done by bullets bogusly passing through walls.

So there you have it, something of an attempt at a fix for the sentry gun, after 8 years...

We didn't have unlocks or the sentry gun in 2142 demoland, so it was a non-issue to me up until switching to the full game.

Test the stock enemies sentry guns against your player on your or another server, and then test them on mine, and let me know what you observe (difference/no difference/etc). Observe which walls they pass through, what walls bullets ricochet off of, whether you take damage behind a wall as sentry gun is shooting through, etc.

Edited by cobrachoppergirl
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...