Jump to content

Photo

G.E.C.K command to make companions go unconscious so they don't di


  • Please log in to reply
17 replies to this topic

#1
ozzy561

ozzy561

    Journeyman

  • Members
  • Pip
  • 26 posts
Hi,
I just installed G.E.C.K today and made a companion that follows me about etc etc. But what I REALLY want changing is his death. Unlike any other companion (not in hardcore mode), my companion will die permanently after his health being reduced. I've already tried ticking off the 'Essential' box on the NPC object box thing, but that didn't work. Can someone please help me, so my companion can just simply go unconscious if hurt.
Thanks

#2
rickerhk

rickerhk

    Resident poster

  • Premium Member
  • 2,958 posts
The game ignores the 'essential' bit if you aren't in hardcore. If you want the companion to die in non hardcore, you have to add something like this to their NPC script:

scn myNPCScript

BEGIN GameMode


; =========== See if we should be dead ==================

		if (Player.IsHardCore == 0)
			if (GetDead == 0)
				if (GetKnockedState == 1)	;unconscious
					SetPlayerTeamMate 0
					Kill
				endif
			endif
		endif
		
END

You still get the 'so and so is unconscious' message, but this is what I use in the Enclave Commander mod and it works.

#3
ozzy561

ozzy561

    Journeyman

  • Members
  • Pip
  • 26 posts
Ok thanks so do I just copy and paste that without changing anything? Like notihing at all?

#4
ozzy561

ozzy561

    Journeyman

  • Members
  • Pip
  • 26 posts
I copied and pasted it on my script as 'Object' but I can't see it under the dropdown list anywhere

#5
Fonger

Fonger

    Phantom Parot

  • Members
  • PipPipPipPipPip
  • 5,475 posts
the provided script is to make the companion DIE not live

If you want the companion to die

and the interesting line is "SetPlayerTeamMate 0"

so "SetPlayerTeamMate 1" will likely put the companion into the system properly
(presuming the refid is set)

#6
ozzy561

ozzy561

    Journeyman

  • Members
  • Pip
  • 26 posts
Oh my god thanks for the reply, I would have never done it without you!
I'll check if that works right now & thank you again.

#7
ozzy561

ozzy561

    Journeyman

  • Members
  • Pip
  • 26 posts
And no, it didn't work. :'(

#8
Fonger

Fonger

    Phantom Parot

  • Members
  • PipPipPipPipPip
  • 5,475 posts

And no, it didn't work. :'(

experiment

open console

click on the companion in question (sets the reference)

then type

SetPlayerTeamMate 1

note there are no spaces in the command except before the 1

close console

open console

click on companion again

type

kill

#9
ozzy561

ozzy561

    Journeyman

  • Members
  • Pip
  • 26 posts
Okay well that does work, and he does go unconscious, but what if I was to upload this mod to the Nexus? Won't everyone who downloads it have to type in that console command?

#10
Fonger

Fonger

    Phantom Parot

  • Members
  • PipPipPipPipPip
  • 5,475 posts

Okay well that does work, and he does go unconscious

that confirms that you are on the correct track

now you gotta figure out how to incorporate it into the companion joins you section of your mod
and of course how to set the reference




Page loaded in: 1.005 seconds