Domi Posted October 28, 2006 Share Posted October 28, 2006 It's a 2-part question: As far as I can tell there is no (?) background running script (ie the same as baldur/baldur25). There is baldur.bcs there, but it does not seem to do anything. Is there one I am missing? If there aren't any, what I am working on is the following: All party members have the same script assigned to them: DPLAYER3.BCS. What I am trying to do, is to make Player1 dialogue him/herself once the Hot Key is pressed: IF HotKey(P) IsPlayerNumber("charbase",1) THEN RESPONSE #100 ActionOverride(Player1,StartDialogueNoSet(Myself)) END By self-explanatory reason, upon pressing the hot-key, the action occurs as many times as there are NPCs in the party. What I am looking for is some sort of a check that allows me to have a trigger that says that only the creature with a specified death variable runs the script. Anything I can do short of deleting the DPLAYER3.BCS from all the joinable NPCs (it's empty anyways)? Link to comment
Avenger Posted October 29, 2006 Share Posted October 29, 2006 To identify the joinables (dunno if this was your problem): 0x40D0 IsScriptName(S:ScriptName*,O:Object*) Or you can assign them specific ids (like in PST). 0x401D Specifics(O:Object*,I:Specifics*Specific) Link to comment
Avenger Posted October 29, 2006 Share Posted October 29, 2006 Btw, who told you there is no baldur.bcs running in iwd2??? The rest check i told you earlier works with THAT!!! baldur.bcs: IF Checkstat(Player1,0,FATIGUE) THEN RESPONSE #100 Displaystring(Player1,3) // ~Mon SmSword d6 Slash~ Changestat(Player1,FATIGUE,1,SET) END Link to comment
Avenger Posted October 29, 2006 Share Posted October 29, 2006 Ok, there is something weird going on in iwd2. When i moved to another area, baldur.bcs stopped running. It resumed when i reloaded the saved game. This makes the stuff quite unreliable. Probably they wanted to remove it completely... Link to comment
Domi Posted October 29, 2006 Author Share Posted October 29, 2006 Yes, that's what I saw with Baldur as well - it flat out did not work for me in the area I was in. You're probably right, they disabled the thing. IWd2 often kicks out as 'almost the same, but different" kindda thing. EDIT: Brilliant! IsScriptName("charbase",Myself) eliminates the problem! thank you! And while I was at it, it hit me that IsPlayerNumber(Myself,1) would have done the trick. Well, now I have a fool-proof check (if there is such thing, lol) and can initiate dialogues with joinable NPCs in IWD2 to my little heart's content. Thanks again, Avenger and the Bigg! Link to comment
Kulyok Posted January 20, 2008 Share Posted January 20, 2008 One year later, I have the same question for IWD. Only, IsScriptName and IsPlayerNumber aren't available there, and I am not sure how this one works: 0x401D Specifics(O:Object*,I:Specifics*Specific) Is there a way? Link to comment
Avenger Posted January 20, 2008 Share Posted January 20, 2008 Specifics checks the 'SPECIFICS' stat of of a creature. It is the 0x2dc byte in the .cre file. Link to comment
Kulyok Posted January 20, 2008 Share Posted January 20, 2008 Okay, got it, thank you! It's working now. Just in case someone might need it in the future, here is the code: (I remembered the rule about One Byte, too) DPLAYER3.baf IF HotKey(K) !Specifics(Myself,168) !StateCheck(Myself,CD_STATE_NOTVALID) THEN RESPONSE #100 ActionOverride(Player1,StartDialogueNoSet(Myself)) END To each NPC script: IF !Specifics(Myself,168) THEN RESPONSE #100 ChangeSpecifics(Myself,168) END And, finally, the dialogue: MULTIG.d (since it gets assigned to all protagonists/custom chars automatically). BEGIN MULTIG CHAIN IF ~True()~ THEN MULTIG PID ~[...]~ Now my only worry is compatibility: what if another mod needs MULTIG(which hasn't existed before, hence my BEGIN MULTIG) for some reason? I guess they are going to be in trouble, right? Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.