Jump to content

Recommended Posts

Posted (edited)

Hi,

 

I'm trying to create a custom dialogue for NPC.

 

I have noticed that [bleedout] under [combat] section never works in game. I checked companions such as Piper, but I couldn't find any special script or condition about bleedout, it just works for these companions.

 

Am I missing something? Thanks for the help.

Edited by syfjhz22
Posted

I have bleedout dialogue for health managed settlers, no problem. Grab SKK Combat Settlers and look at SKK_CSETQuest - MISC - Greeting - SKK_CSETGreeting

 

Ah ! Holdon you may need to set; (ThisActor as Actor).AllowBleedoutDialogue(TRUE) as it is mostly false by default.

Posted (edited)
  On 6/15/2020 at 6:33 PM, syfjhz22 said:

Hi,

 

I'm trying to create a custom dialogue for NPC.

 

I have noticed that [bleedout] under [combat] section never works in game. I checked companions such as Piper, but I couldn't find any special script or condition about bleedout, it just works for these companions.

 

Am I missing something? Thanks for the help.

I know very little about about scripts...

 

Do you mind to give an example how "AllowBleedoutDialogue(TRUE)" can be implement for an actor or a dialogue topic? Really appreicate your help.

 

I looked at your mod and realised I may use a condition to trigger bleedout dialogue, just like crippled limbs. However, it doesn't work this way so I guess it must be scripted...

 

----------

 

Because I know nothing about script, I tried to create one for actor but it failed to compile...

Scriptname BleedoutDialogue extends ObjectReference

Function AllowBleedoutDialogue(bool abCanTalk) native

   Self.AllowBleedoutDialogue(true)

EndFunction

BleedoutDialogue.psc(5,7): no viable alternative at input '.'

 

Could you please help?

Edited by syfjhz22
Posted

The right format of script requires context, what are you attaching the script to:

 

An Actor base form

 

A placed actor ObjectReference in the render window

 

A spawned actor ObjectReference in game.

 

Something else (describe it)

Posted
  On 6/15/2020 at 6:33 PM, syfjhz22 said:

Hi,

 

I'm trying to create a custom dialogue for NPC.

 

I have noticed that [bleedout] under [combat] section never works in game. I checked companions such as Piper, but I couldn't find any special script or condition about bleedout, it just works for these companions.

 

Am I missing something? Thanks for the help.

After several attempts, I managed to compile using the following script

Scriptname BleedoutDialogue extends Actor  



Event OnEnterBleedOut()



     Self.AllowBleedoutDialogue(true)



EndEvent

Now I can interact with the actor during bleedout, but the actor still doesn't speak the topic group under [bleedout]. I then tried to add "isbleedingout" condition, but still not speaking the lines.

 

The actor only speak default hello lines after E is pressed.

 

 

 

What I really want is the actor announcing he/she is bleeding out automatically when neutralised. I have no idea how it works...

Posted
  On 6/15/2020 at 11:03 PM, SKK50 said:

The right format of script requires context, what are you attaching the script to:

 

An Actor base form

 

A placed actor ObjectReference in the render window

 

A spawned actor ObjectReference in game.

 

Something else (describe it)

 

I now tried to move bleedout to hello lines, then add "isbleedingout" condition =1, and !=1 for other lines.

 

When I press E the actor now speaks the lines, but is there any way for the actor to speak bleedout lines automatically when nuetralised, just like vanilla companions?

Posted

As far as I know (there may be other methods) you need to apply a FORCEGREET AI package to the actor;

 

On the actor base form with a condition isbleedingout = true, or;

 

via a quest alias which the actor is forced into by script for the event OnBleedoutStart()

Posted (edited)
  On 6/16/2020 at 12:09 AM, SKK50 said:

As far as I know (there may be other methods) you need to apply a FORCEGREET AI package to the actor;

 

On the actor base form with a condition isbleedingout = true, or;

 

via a quest alias which the actor is forced into by script for the event OnBleedoutStart()

After several testing, ForceGreet package will not automatically start upon bleedout with isbleedingout condition. I don't think "isbleedingout" condition is actually a trigger, it's probably just a condition...

 

I'm trying to figure out how to force start via script, any help would be highly appreciated.

Edited by syfjhz22
Posted

That is correct I never suggested isbleedingout is not TRIGGER it is just a CONDITION. The forcegreet package is the TRIGGER for story manager to pick the relevant TOPIC for the actor to initiate.

 

An alternative is to script the SAY function which is a blunt instrument with no fancy dialogue support like camera focus or wait-on-completion;

Topic  Property pSKK_CSETSay Auto Const mandatory ;apply a unique name to your dialog topic 
GlobalVariable  Property pSKK_CSETSayValue Auto Const Mandatory ;to pick which line to use in the topic 

Event OnEnterBleedout()
Actor Player = Game.GetPlayer()
If Player.GetDistance(Self) < 512
   pSKK_CSETSayValue.SetValue(1) ;Player Hello
   (Self as Actor).Say(pSKK_CSETSay, akActorToSpeakAs = None, abSpeakInPlayersHead = false, akTarget =  Player)
   Utility.WaitMenuMode(1.0) ;time to say hello
   pSKK_CSETSayValue.SetValue(0) ;none
EndIf
EndEvent
Posted (edited)
  On 6/16/2020 at 10:18 AM, SKK50 said:

 

That is correct I never suggested isbleedingout is not TRIGGER it is just a CONDITION. The forcegreet package is the TRIGGER for story manager to pick the relevant TOPIC for the actor to initiate.

 

An alternative is to script the SAY function which is a blunt instrument with no fancy dialogue support like camera focus or wait-on-completion;

Topic  Property pSKK_CSETSay Auto Const mandatory ;apply a unique name to your dialog topic 
GlobalVariable  Property pSKK_CSETSayValue Auto Const Mandatory ;to pick which line to use in the topic 

Event OnEnterBleedout()
Actor Player = Game.GetPlayer()
If Player.GetDistance(Self) < 512
   pSKK_CSETSayValue.SetValue(1) ;Player Hello
   (Self as Actor).Say(pSKK_CSETSay, akActorToSpeakAs = None, abSpeakInPlayersHead = false, akTarget =  Player)
   Utility.WaitMenuMode(1.0) ;time to say hello
   pSKK_CSETSayValue.SetValue(0) ;none
EndIf
EndEvent

Thank you so much for the replies.

 

I'm sure this say function is what I really needed, but I can't get it to work.

 

Coud you please take a look? I really know nothing about scripts, but I would like to attach it to the actor base form...

Scriptname BleedoutDialogue extends Actor  

Topic Property pHello Auto Const mandatory                                     ;If I want to use hello topic, should the topic property be pHello or Hello?
GlobalVariable Property pHelloValue Auto Const Mandatory

Event OnEnterBleedout()
         Self.AllowBleedoutDialogue(true)                                              ;This function still works
Actor Player = Game.GetPlayer()
         pHelloValue.SetValue(1)
         Self.Say(pHello, akActorToSpeakAs = None, abSpeakInPlayersHead = false, akTarget =  Player)
         Utility.WaitMenuMode(1.0)
         pHelloValue.SetValue(0)
EndEvent
Edited by syfjhz22
  • Recently Browsing   0 members

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