pc67 Posted February 6, 2010 Share Posted February 6, 2010 Hello, I am trying to make a mod where the player attacks the DB sanctuary in Cheydinhal, after the player kills the 7 assassins there, the end of quest stage is supposed to trigger. I can't seem to get it to work though. I have already set all the essential characters to non essential, as well as trying variant stripts based on similar vanilla oblivion missions (purification), but nothing seems to work. The following is the most straight-forward i could come up with. I've used similar commands to trigger other stages, though not with as many actor REFs. any ideas? I'm stumped. Scriptname 13chey begin gamemode if ( AntoinettaMarieRef.GetDead == 1 ) if ( GogrongroBolmogRef.GetDead == 1 ) if ( MraajDaarRef.GetDead == 1 ) if ( OcheevaStandJoinRef.GetDead == 1 ) if ( TeinaavaRef.GetDead == 1 ) if ( TelaendrilRef.GetDead == 1 ) if ( VicenteValtieriRef.GetDead == 1 ) setstage CheydinhalPurge 90 endif endif endif endif endif endifendif End Link to comment Share on other sites More sharing options...
Vagrant0 Posted February 6, 2010 Share Posted February 6, 2010 Hello, I am trying to make a mod where the player attacks the DB sanctuary in Cheydinhal, after the player kills the 7 assassins there, the end of quest stage is supposed to trigger. I can't seem to get it to work though. I have already set all the essential characters to non essential, as well as trying variant stripts based on similar vanilla oblivion missions (purification), but nothing seems to work. The following is the most straight-forward i could come up with. I've used similar commands to trigger other stages, though not with as many actor REFs. any ideas? I'm stumped.The problem with Scriptname 13chey begin gamemode if ( AntoinettaMarieRef.GetDead == 1 ) if ( GogrongroBolmogRef.GetDead == 1 ) if ( MraajDaarRef.GetDead == 1 ) if ( OcheevaStandJoinRef.GetDead == 1 ) if ( TeinaavaRef.GetDead == 1 ) if ( TelaendrilRef.GetDead == 1 ) if ( VicenteValtieriRef.GetDead == 1 ) setstage CheydinhalPurge 90 endif endif endif endif endif endif endif EndIs that all of the conditions are based around the first one being true, so all the actors need to have been killed before anything can happen, and it makes it very difficult to know where the script is having a problem. Instead, you need to setup the script so that it checks each one individually, using script variables to keep count of how many were killed and to prevent the same person from being counted twice. Something more like Scriptname 13chey short cheydeadct short mariedone short gogrondone short mraajdone ;; ect ;; ect for all begin gamemode if cheydeadcount >= 7 setstage CheydinhalPurge 90 else if AntoinettaMarieRef.GetDead == 1 && mariedone != 1 set mariedone to 1 set cheydeadcount to cheydeadcount + 1 elseif GogrongroBolmogRef.GetDead == 1 && gogrondone != 1 set gogrondone to 1 set cheydeadcount to cheydeadcount + 1 elseif MraajDaarRef.GetDead == 1 && mraajdone != 1 set mraajdone to 1 set cheydeadcount to cheydeadcount + 1 ;;and so on for all endif endif End You should also probably refrain from using parenthesis unless you are working with formulas, within function checks it might interfere with how the script is being run. Eg; if vara == (2 + varb) 3 && getstage quest 20 instead of if (vara == (2 +varb) 3) && getstage quest 20 Link to comment Share on other sites More sharing options...
clockout1 Posted February 6, 2010 Share Posted February 6, 2010 I'm not much of a scripter, but wouldn't it work if instead you put "&&" between each if statement? Link to comment Share on other sites More sharing options...
pc67 Posted February 6, 2010 Author Share Posted February 6, 2010 I switched the script to the else function, and it looks like it would work, but stage 90 still does not trigger. I know it is not an issue with the actor REFs since the quest target pointers all work properly. So either the count is not working (but i dont see why), or that it's not checking the GetDead agianst the script (which makes no sence, the quest priority is at 60, and i've used Getdead a lot and not had this issue). I'm checking to see if i'm running some other mod that would affect the DB, but i dont see one so far. For reference, here is the script as is. Scriptname 13chey short cheydeadcountshort mariedoneshort gogrondoneshort mraajdoneshort Ocheevadoneshort Teinaavadoneshort Telaendrildoneshort VVdone begin gamemode else if AntoinettaMarieRef.GetDead == 1 && mariedone != 1 set mariedone to 1 set cheydeadcount to cheydeadcount +1 elseif GogrongroBolmogRef.GetDead == 1 && gogrondone != 1 set gogrondone to 1 set cheydeadcount to cheydeadcount + 1 elseif MraajDaarRef.GetDead == 1 && mraajdone != 1 set mraajdone to 1 set cheydeadcount to cheydeadcount + 1 elseif OcheevaStandJoinRef.GetDead == 1 && Ocheevadone != 1 set Ocheevadone to 1 set cheydeadcount to cheydeadcount + 1 elseif TeinaavaRef.GetDead == 1 && Teinaavadone != 1 set Teinaavadone to 1 set cheydeadcount to cheydeadcount + 1 elseif TelaendrilRef.GetDead == 1 && Telaendrildone != 1 set Telaendrildone to 1 set cheydeadcount to cheydeadcount + 1 elseif VicenteValtieriRef.GetDead == 1 && VVdone != 1 set VVdone to 1 set cheydeadcount to cheydeadcount + 1 endifendif if cheydeadcount >= 7 setstage 13CheydinhalPurge 90endif End Link to comment Share on other sites More sharing options...
pc67 Posted February 6, 2010 Author Share Posted February 6, 2010 I'm not much of a scripter, but wouldn't it work if instead you put "&&" between each if statement? The graduated if clauses work like an &&. I actually tried a variant on the script where i had all the conditions in single if function ( if ( Actor1REF.getdead && Actor2REF.getdead etc....)), but that didnt work either. Link to comment Share on other sites More sharing options...
Vagrant0 Posted February 7, 2010 Share Posted February 7, 2010 (edited) I switched the script to the else function, and it looks like it would work, but stage 90 still does not trigger. I know it is not an issue with the actor REFs since the quest target pointers all work properly. So either the count is not working (but i dont see why), or that it's not checking the GetDead agianst the script (which makes no sence, the quest priority is at 60, and i've used Getdead a lot and not had this issue). I'm checking to see if i'm running some other mod that would affect the DB, but i dont see one so far. For reference, here is the script as is.Scriptname 13chey short cheydeadcount short mariedone short gogrondone short mraajdone short Ocheevadone short Teinaavadone short Telaendrildone short VVdone begin gamemode else if AntoinettaMarieRef.GetDead == 1 && mariedone != 1 set mariedone to 1 set cheydeadcount to cheydeadcount +1 elseif GogrongroBolmogRef.GetDead == 1 && gogrondone != 1 set gogrondone to 1 set cheydeadcount to cheydeadcount + 1 elseif MraajDaarRef.GetDead == 1 && mraajdone != 1 set mraajdone to 1 set cheydeadcount to cheydeadcount + 1 elseif OcheevaStandJoinRef.GetDead == 1 && Ocheevadone != 1 set Ocheevadone to 1 set cheydeadcount to cheydeadcount + 1 elseif TeinaavaRef.GetDead == 1 && Teinaavadone != 1 set Teinaavadone to 1 set cheydeadcount to cheydeadcount + 1 elseif TelaendrilRef.GetDead == 1 && Telaendrildone != 1 set Telaendrildone to 1 set cheydeadcount to cheydeadcount + 1 elseif VicenteValtieriRef.GetDead == 1 && VVdone != 1 set VVdone to 1 set cheydeadcount to cheydeadcount + 1 endif endif if cheydeadcount >= 7 setstage 13CheydinhalPurge 90 endif End In moving the deadcount, you broke the script. Your script should be; Scriptname XPC67cheyquestscriot short cheydeadcount short mariedone short gogrondone short mraajdone short Ocheevadone short Teinaavadone short Telaendrildone short VVdone short doonce begin gamemode if cheydeadcount >= 7 && doonce != 1 setstage 13CheydinhalPurge 90 set doonce to 1 Else if AntoinettaMarieRef.GetDead == 1 && mariedone != 1 set mariedone to 1 set cheydeadcount to cheydeadcount +1 Message "marie dead" elseif GogrongroBolmogRef.GetDead == 1 && gogrondone != 1 set gogrondone to 1 set cheydeadcount to cheydeadcount + 1 elseif MraajDaarRef.GetDead == 1 && mraajdone != 1 set mraajdone to 1 set cheydeadcount to cheydeadcount + 1 elseif OcheevaStandJoinRef.GetDead == 1 && Ocheevadone != 1 set Ocheevadone to 1 set cheydeadcount to cheydeadcount + 1 Message "Ocheeva dead" elseif TeinaavaRef.GetDead == 1 && Teinaavadone != 1 set Teinaavadone to 1 set cheydeadcount to cheydeadcount + 1 elseif TelaendrilRef.GetDead == 1 && Telaendrildone != 1 set Telaendrildone to 1 set cheydeadcount to cheydeadcount + 1 elseif VicenteValtieriRef.GetDead == 1 && VVdone != 1 set VVdone to 1 set cheydeadcount to cheydeadcount + 1 Message "Vincente dead" endif endif EndMade a few changes to add a message when certain actors are killed. These should trigger, if not, there's some formatting error somewhere. The way that the script is setup is rather important so that it only performs the checks on the actors until the count is reached, and then switches to a mode which is less resource intensive. If this is the only thing you need scripted for your quest, you should be able to use the script as-is, and only comment out or remove the messages once you have it working. :wallbash: Just realized what your problem might be. You're using numbers to start your forms. This is a BIG mistake, and should NEVER, EVER, EVER be done. You'll need to correct this in order to get anything working. ALWAYS start your editor IDs with 2 letters (not AA, ZZ, XX, and other common ones). You may take an extra 15 seconds to find it in a list, but it'll save you from ever having an issue where otherwise valid scripts refuse to work. Edited February 7, 2010 by Vagrant0 Link to comment Share on other sites More sharing options...
pc67 Posted February 7, 2010 Author Share Posted February 7, 2010 Made a few changes to add a message when certain actors are killed. These should trigger, if not, there's some formatting error somewhere. The way that the script is setup is rather important so that it only performs the checks on the actors until the count is reached, and then switches to a mode which is less resource intensive. If this is the only thing you need scripted for your quest, you should be able to use the script as-is, and only comment out or remove the messages once you have it working. Just realized what your problem might be. You're using numbers to start your forms. This is a BIG mistake, and should NEVER, EVER, EVER be done. You'll need to correct this in order to get anything working. ALWAYS start your editor IDs with 2 letters (not AA, ZZ, XX, and other common ones). You may take an extra 15 seconds to find it in a list, but it'll save you from ever having an issue where otherwise valid scripts refuse to work. I had no idea about the form ID. Thanks. I switched them out to letters. The message wasn't triggering on Ocheeva, which then made me realize i was targeting OcheevaStandJoinRef and not OcheevaRef :whistling:. OcheevastandjoinRef is a marker were ocheeva greets the player when first joining the DB, which happens to occupy the same space as OcheevaREF. I'm going to re-work the scripts to remove the numbered codes, but I wouldn't have found the Ref issue without your help. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts