Jump to content

Target spotting / marking for companions?


becauseofreasons

Recommended Posts

I don't have enough experience with NVSE or the GECK (to be honest) to give a great assessment of the difficulties inimplementing this.

 

I was talking with my roommate and while fighting alongside Boone, he mentioned how useful it would be to mark / target / spot enemies for your allies. I made a mockup of the idea.

 

http://i.imgur.com/np4QRoPl.png

 

Partly the aspect of having enemies marked on the worldspace, but also prioritizing for allies. Having the marks enter onto a queue for extermination would make companion combat a hell of a lot more interesting.

 

So yeah. I don't know how hard this would be, but it's something that would be a fantastic addition to New Vegas.

 

EDIT: I did some NVSE research and created a theoretically-almost-functional prototype for a marker script.

 

scn targetSpotter

array_var targetArray
array_var followerArray
int spotKey = 45
int actorREFCount
int actorREF

let targetArray := ar_construct ref
let followerArray := ar_construct ref

begin gamemode

	set actorREFCount to GetNumRefs 200 2
	set actorREF to GetFirstREF 200 2

	while actorREFCount > 0
		set actorREF to getNextRef
		if (actorREF.getPlayerTeammate)
			ar_Append followerArray actorREF
		endif
		set actorREFCount -= 1
	loop

	if IsKeyPressed(spotKey)
		ar_Append targetArray Player.GetCrosshairRef
	endif

	while player.IsInCombat
		if IsKeyPressed(spotKey)
			ar_Append targetArray Player.GetCrosshairRef
		endif
		foreach targetArray
	       	        ; draw the death cone above targets... not sure the best way to do this
	              	if GetDead(item["value"])
				ar_Erase targetArray item
			endif
		loop		
		foreach followerArray
			item.StartCombat targetArray[0]
		loop
	loop
end
There are a few issues right off the bat -
  • This is probably not the most efficient way of collecting teammate refs in the world.
  • I don't know the best way to draw a cone above targets. Not sure if sprite plotting is possible, or if creating clones of an inverted 3D cone would be the way to go.
  • I hate myself for including the 'if keypress' code twice, but I'm fairly sure that not doing that would preclude the user either from selecting new targets during combat or from selecting targets outside of combat.
If someone would be willing to adopt this script or help me with it, I'd be super-grateful. Edited by becauseofreasons
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...