Spotting enemies?

Ask questions, discuss ideas, get answers
Post Reply
Carnie The Clown
Posts: 50
Joined: Wed May 29, 2013 9:48 pm

Spotting enemies?

Post by Carnie The Clown »

Hey everyone. I have a question about 1942.

Is there any sort of spotting at all, other than calling out what you see by hitting the F keys?
It seems like there is a way to spot enemy vehicles, because I recall looking at , the mini map icon files, and I noticed that they're white, indicating that they should be able to turn red and blue.

Is there a mod or any way to actually spot enemies?
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Spotting enemies?

Post by Vilespring »

*bump

I actually want to hear about this, I'm very interested.
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Spotting enemies?

Post by Swaffy »

OR make the enemy icon appear for the enemy too, kind of like how the allied team shows as blue...

I know how to do that for a vehicle, but not a soldier.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Carnie The Clown
Posts: 50
Joined: Wed May 29, 2013 9:48 pm

Re: Spotting enemies?

Post by Carnie The Clown »

Swaffy wrote:OR make the enemy icon appear for the enemy too, kind of like how the allied team shows as blue...

I know how to do that for a vehicle, but not a soldier.
Hmm...that's interesting. How do you do it for a vehicle.
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Spotting enemies?

Post by Swaffy »

Basically just attach a PCO to the host PCO that no one can enter that has the same icon. Only downside, the icon will always be gray colored.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Diamondback
Posts: 590
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada
Contact:

Re: Spotting enemies?

Post by Diamondback »

http://www.velotech.net/battlefield/com ... tegory=hud

This is considering hacking, but it's the closest method for what you want to accomplish I think.

Either

Code: Select all

hud.toggleDebugMap 
or

Code: Select all

hud.useThumbnailMap 
will show the enemy soldiers on your mini-map as GREY icons moving around. Don't know how to colour them though. It was successfully tested on Secret Weapons Demo v1.45, not sure if it'll work on v1.61/1.612 so try it out.

Just enter those commands in the console by pressing the tilde key under Esc. Use at your own risk!
See my Strasbourg map project here.
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Spotting enemies?

Post by Apache Thunder »

I actually played around with something like this a long time back. I found a method of spawning PCOs via the damage system by having a special gun shoot an invisible projectile at the target. If it hits a certain material like 40, 41, or 42 for soldier for example it would spawn a PCO with a minimap icon to indicate where the spotted enemy was. I could even have a tank spotted action by having it spawn a different PCO if it hits material 54 instead.


It worked great....until I tested it in multiplayer. :(

Only issue is that it would cause crashes in muliplayer. However it may be fixable if you use the if host v_arg stuff on it since at the time I never thought to try adding it. Thus any effect bundle you put a spawner on, you can enclose it in this. Here's an example using 4006 as our material for the special projectile:

Code: Select all

MaterialManager.attGroup 4006
MaterialManager.defGroup 40
MaterialManager.damageMod 3
if v_arg1 == host
MaterialManager.setEffectTemplate e_infantryspottedSpawner
else
MaterialManager.setEffectTemplate e_infantryspottedSpawnerNULL
endIf
The alternate effect under the else statement means that clients will instead use that on their end and only the server will create the spawner effect. In my original attempts I did not have this code, so both the client and server would do this and that may be why it was causing CTDs. The main thing to remember is that the spotted icon will not move with the target. How long the minimap icon remains on the map can be determined by how long you want invisible PCO to persist by tweaking the critical damage settings so it self destructs after a certain amount of time. ;)

The "e_infantryspottedSpawner" would actually just be a object spawner that spawns the special PCO that places the minimap icon for infantry alert. The "e_infantryspottedSpawnerNULL" is the alternate blank EffectBundle that only clients will load. The server will be what uses the spawner.


There is alternate idea I just came up with that would work in case you can't get the damage system method to work. Instead place a invisible PCO via holdobject on a spawner onto every vehicle and soldier. Then have the projectile that your spotting weapon uses have a specific explosion material that only kills that PCO.

Thus the PCO dies and via the armor effect system spawns a second PCO that has a minimap icon of your choosing! Have that PCO self destruct via critical damage coding much like the first method so you can have the icon disappear after a certain time. As with the other method, the second PCO spawns independently of the host PCO that died, so it won't move with the soldier/vehicle. ;)

This second method I know should work because I had made destructible bunkers in one of my earlier mods that spawned a PCO wreck. (at the time I wanted the ceiling to not be in the wreck, but the normal lod system always uses the collision from the first lod, thus being able to shoot into a wrecked bunker would fail to work. So I had to spawn an independent PCO object and that worked out fine in my mod. Especially for my destructible bridges. :D )
ImageImageImage
I have cameras in your head!
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Spotting enemies?

Post by Vilespring »

I like that idea, but, when the PCO is on a foot soldier, would it fail to re-appear when exiting a vehicle?
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Spotting enemies?

Post by Apache Thunder »

No it will not. My updated AP Mine system for my BFH'42 mod uses a PCO held to a spawner tied to a soldier. If the soldier enters a vehicle without a visible seat (like driver position of tanks) the spawner may vanish and the PCO will drop/die/vanish. But it will respawn immediately when the soldier exists the vehicle since the spawner remains part of the soldier. It's only collision group settings that get reset when a soldier enters a vehicle. ;)
ImageImageImage
I have cameras in your head!
Post Reply