Jump to content

companion drawing weapons


LVB2

Recommended Posts

how do u get your companion to draw there weapons when you do i tried scripting it but they still wont my script looks like this what am i doing wrong can someone please help

 

 

ScriptName MyCompanionQuestScript

 

short Status ;1 = following, 2 = waiting, 3 = sandboxing

short DoOnce

short Weaponout

 

begin GameMode setplayerteammate 1

if (DoOnce != 1)

set Status to 3

set DoOnce to 1

MyCompanionRef.evp

endif

Endif

MyCompanionRef.evp

if ( Player.isweaponout == 1 )

MyCompanionRef.evp . Setalert 1

elseif ( Player.isweaponout == 0 && player.IsInCombat == 0 )

MyCompanionRef.Setalert 0

endif

 

 

END

________

Link to comment
Share on other sites

ah I am unsure what you are trying to do there is an easier way then scripts, but I would need more detail on what you are doing ie do want them drawn all the time, some of the time, or just at certain spots
Link to comment
Share on other sites

I'm not the original poster but I've been watching this topic and wondering the same thing. From his post, I think he wants the same thing I want, which is to make the companion draw their weapon, ready for combat, whenever the player has their own weapon out.

 

I always thought it was weird that vanilla and modded companions would follow you around calmly while you're all combat-ready because you see a bunch of Raiders just 50 yards away.

Link to comment
Share on other sites

This is the code I use in my mod in the "BEGIN Gamemode" section of the "NPC Script" to get that effect. Make sure its in the NPC Script.

if ( getactorvalue variable03 == 1 )          ;Is the NPC following you?
if ( player.IsWeaponOut == 1 )        ;If your weapon is out
	SetAlert 1                    ;NPC draws weapon
else                                  ;If weapon is not out
	SetAlert 0                    ;NPC holsters weapon
endif
endif

Link to comment
Share on other sites

Well that makes sense. I'll try that out. I also noticed that LVB2's script is similar but there are spaces around the periods for some reason, which may lead to syntax errors.

 

- edit:

 

Thanks vforvic. Looks like that works. I actually edited it so that the script is a bit lighter so it looks like this:

 

BEGIN GameMode
; Draw weapon when player has weapon out.
if  ( GetPlayerTeammate == 1 ) && ( player.IsWeaponOut == 1 )
	SetAlert 1
else
	SetAlert 0
endif
end

 

Tested it in-game and it works like a charm.

Edited by HosokawaTakuya
Link to comment
Share on other sites

  • Recently Browsing   0 members

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