Andyr Posted April 28, 2006 Share Posted April 28, 2006 Looks like you're making good progress. Link to comment
cmorgan Posted April 29, 2006 Author Share Posted April 29, 2006 On TakeItemCreate: I have found the manual way around the question by destroying the item on each of P1, P2, P3, etc. and then creating the new item for P1. For future reference, TakeItemCreate *does not* check the whole party, right? OK, I think I have one answer for the Imp Spell. Create a .cre override script, X#ICHTHR.bcs, coded IF Global("DYQUImpAttack","GLOBAL",1) Global("X#DImpSpell","LOCALS",0) !Dead("Ichthraa") THEN RESPONSE #100 StartTimer("ImpSpell",5) SetGlobal("X#DImpSpell","LOCALS",1) DisplayStringHead("Ichthraa",~All mortal men must die~) Continue() END IF Global("X#DImpSpell","LOCALS",1) TimerExpired("ImpSpell") !Dead("Ichthraa") THEN RESPONSE #100 StartTimer("ImpSpell",5) SetGlobal("X#DImpSpell","LOCALS",2) DisplayStringHead("Ichthraa",~And mortal women do too~) Continue() END IF Global("X#DImpSpell","LOCALS",2) TimerExpired("ImpSpell") !Dead("Ichthraa") THEN RESPONSE #100 StartTimer("ImpSpell",5) SetGlobal("X#DImpSpell","LOCALS",3) DisplayStringHead("Ichthraa",~Run, snow wolf, run~) Continue() END etc., etc., until out of text to say... Since the next block of script won't run if the creature is dead and there are no attack response actions, as long as no scripts are assigned to the .cre other than this the behavior should be stand still even when being attacked, display text over the imp's head for 5 seconds, and then immediately display the next line. I could even signal the end of a verse with a "gong" sound ("Ask not for whom the Bell Tolls, Dynaheir... It Tolls for Thee!") by tucking in a PlaySound("soundfile") line. At the end block, IF Global("X#DImpSpell","LOCALS",10) TimerExpired("ImpSpell") !Dead("Ichthraa") THEN RESPONSE #100 PlaySound("_EFF_P18") ActionOverride("Ichthraa") SetGlobal("X#WinskiTakeDyna","GLOBAL",1) SetGlobal("DynaheirRomanceInactive","GLOBAL",1) ReallyForceSpell("Minsc",DRYAD_TELEPORT) ReallyForceSpell("Dynaheir",DRYAD_TELEPORT) EscapeArea() END Questions: #1 am I way off base here? #2 do I need to rename SetTimer, or will it recycle in this usage? #3 Is the evaluation order top down or bottom up (i.e. do I need to reverse the response order)? #4 what happens if Minsc is not in the party - is he skipped, or does the script fail? Link to comment
cmorgan Posted April 30, 2006 Author Share Posted April 30, 2006 Well, after a day of testing and blundering about, it almost works. Since I have the workaround for the TakeItemReplace, I am dispensing with it -- the more thorough way seems safer. Would love some input on its use someday... PPG and G3 both pretty lean on the postings (goes back to Weimer coding for it on the fourth post found!). The script (finally) compiled; changes were 1. just an EscapeArea for the test .cre instead of all of the last response block, as it was for testing and 2. the StartTimers renamed for safety, which doesn't seem to matter - the compiled script says StartTimer(0,5) and TimerExpired(0) on each block anyways. Last problem: I can tell the script is running because the sounds play and the cre escapes the area. Unfortunately,the display string does not show up ingame. I know the DIALOG.TLK includes the new strings; do I need to start a new game for the strings to show up, or am I missing something? EDIT: tep, new game = everything working as wanted. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.