jastey Posted February 16, 2017 Share Posted February 16, 2017 What would I use if I don't want the NPC to initiate dialogue while the PC is hiding in shadows? What else is there that would let my NPC hesitate to initiate conversation because he knows the PC is preparing an attack / wants to prevent a fight? !StateCheck(Player1,STATE_INVISIBLE), !StateCheck(Player1,STATE_IMPROVEDINVISIBILITY), ...? Thank you! Link to comment
Roxanne Posted February 16, 2017 Share Posted February 16, 2017 There is a vanilla script InitInv.bcs for this purpose. At least it exists in the EE's IFSee([PC])!StateCheck(LastSeenBy(Myself),STATE_INVISIBLE)!StateCheck(LastSeenBy(Myself),STATE_IMPROVEDINVISIBILITY)Allegiance(Myself,NEUTRAL)THENRESPONSE #100Dialogue(LastSeenBy(Myself))ENDIFSee(Player1)!StateCheck(Player1,STATE_INVISIBLE)!StateCheck(Player1,STATE_IMPROVEDINVISIBILITY)Allegiance(Myself,NEUTRAL)THENRESPONSE #100Dialogue(Player1)ENDIFSee(Player2)!StateCheck(Player2,STATE_INVISIBLE)!StateCheck(Player2,STATE_IMPROVEDINVISIBILITY)Allegiance(Myself,NEUTRAL)THENRESPONSE #100Dialogue(Player2)ENDIFSee(Player3)!StateCheck(Player3,STATE_INVISIBLE)!StateCheck(Player3,STATE_IMPROVEDINVISIBILITY)Allegiance(Myself,NEUTRAL)THENRESPONSE #100Dialogue(Player3)ENDIFSee(Player4)!StateCheck(Player4,STATE_INVISIBLE)!StateCheck(Player4,STATE_IMPROVEDINVISIBILITY)Allegiance(Myself,NEUTRAL)THENRESPONSE #100Dialogue(Player4)ENDIFSee(Player5)!StateCheck(Player5,STATE_INVISIBLE)!StateCheck(Player5,STATE_IMPROVEDINVISIBILITY)Allegiance(Myself,NEUTRAL)THENRESPONSE #100Dialogue(Player5)ENDIFSee(Player6)!StateCheck(Player6,STATE_INVISIBLE)!StateCheck(Player6,STATE_IMPROVEDINVISIBILITY)Allegiance(Myself,NEUTRAL)THENRESPONSE #100Dialogue(Player6)END Link to comment
Ardanis Posted February 16, 2017 Share Posted February 16, 2017 !TriggerOverride(Player1,ModalState(STEALTH)) Link to comment
Roxanne Posted February 16, 2017 Share Posted February 16, 2017 !TriggerOverride(Player1,ModalState(STEALTH)) Does that work for old game as well? Or only EE? Link to comment
Jarno Mikkola Posted February 16, 2017 Share Posted February 16, 2017 Does that work for old game as well? Or only EE? Looking at the extended IESDP, will tell you that at least the ModalState(STEALTH) part works in both games... don't know about the TriggerOverride -command... but that's for you to try out. Link to comment
argent77 Posted February 16, 2017 Share Posted February 16, 2017 TriggerOverride(target, trigger()) is a convenience construct used by WeiDU to mimic the ActionOverride() command. It's actually encoded as two consecutive commands NextTriggerObject(target) followed by trigger(). NextTriggerObject() is available for EE games and original BG2+TobEx. Link to comment
jastey Posted February 17, 2017 Author Share Posted February 17, 2017 Without TobEx, it's not possible to check the hiding status? Or how would I do that? Link to comment
Jarno Mikkola Posted February 17, 2017 Share Posted February 17, 2017 Without TobEx, it's not possible to check the hiding status? Or how would I do that?Nope, doesn't look like so. But you can include the install file library that is all that's needed for the install to happen, if it hasn't been installed yet. Just like the SCS, and other do it. Link to comment
jastey Posted February 17, 2017 Author Share Posted February 17, 2017 I have more questions to triggers / actions. InPartyAllowDead() vs. InParty() - do I assume correctly that InParty() dies not give true if the NPC is dead? Is there a trigger to detect whether an NPC already joined the group? Link to comment
Roxanne Posted February 17, 2017 Share Posted February 17, 2017 I have more questions to triggers / actions. InPartyAllowDead() vs. InParty() - do I assume correctly that InParty() dies not give true if the NPC is dead? Is there a trigger to detect whether an NPC already joined the group? yes - to the first question BeenInParty("DV*) - to second question (again this is EE only, EET uses it for the continuous NPCs feature). Not sure however it is what you need, as it is set for all NPCs that have ever joined, so not just current party. >>>>however you can create your own global to track if some NPC has joined and evaluate that, right? Link to comment
jastey Posted February 17, 2017 Author Share Posted February 17, 2017 BeenInParty("DV*) is what I meant, thank you. Yes, I could (and might) use my own variable. And I didn't know about InParty() not giving true for a dead NPC. I need to rewrite some triggers (the few where someone reacts to a party member without initiating dialogue). Thank you! Link to comment
jastey Posted February 17, 2017 Author Share Posted February 17, 2017 Are there any restrictions to SetDialog()? Could I, in theory, change the joined DLG to xxxP.DLG, and the out-of-party dialogue or the meeting dialogue to xxxJ.DLG by SetDialog() for the NPC (while he is in / out oft the party)? Do the DLG names get resetted at some point (to what is defined in pdialog.2da), or does the set DLG stay active until it is changed by SetDialog() again? Link to comment
K4thos Posted February 17, 2017 Share Posted February 17, 2017 PDIALOG.2DA (or other 2da files if referenced in CAMPAIGN.2DA) kicks in whenever: - NPC joins party (JOIN dialogue set) - NPC is kicked from party (POST dialogue set) - game is loaded and NPC is in party (JOIN dialogue set) So generally SetDialog() should be only used on CREs outside the party. This way dialogue is not reset unless NPC joins the party. Link to comment
jastey Posted February 17, 2017 Author Share Posted February 17, 2017 Cool. Thank you! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.