CarnivalOfFear Posted May 31, 2012 Share Posted May 31, 2012 Im trying to get this script working I want the NPC dying to trigger a quest event. right now the script wont even save because theres something wrong with it :/ scn 00silverrushDeathSCRIPT begin onDeath 00VangraphContact if getStage 00expanding = 10 setStage 00expanding 15 if getStage 00expanding = 15 setStage 00expanding 20 endif end any ideas? Link to comment Share on other sites More sharing options...
Jeux Posted May 31, 2012 Share Posted May 31, 2012 First off, stop using editor ids with numeric beginnings. Scripts get confused trying read editor ids and references with "000" at the beginning. At least, that's from my experience. I may be wrong here. Link to comment Share on other sites More sharing options...
Cyberlazy Posted May 31, 2012 Share Posted May 31, 2012 (edited) Second, Use if/elseif/endifor if/endif if/endifyou have if/if/endif thats not gonna work. Also, Don't do: if (x == 0)set x to 10elseif (x == 10)set x to 20endif Because geck seems so stupid as to execute both. (Could be wrong but seems many of my scripts have been broken by that), X will go from 0 to 20 in one execution of the script. (Elseif seems to be equivilent of endif, if) if (x == 10)set x to 20elseif (x == 0)set x to 10endif Works, as X will never be set to a value that has not yet been tested for. (its 'backwards') Edited May 31, 2012 by Cyberlazy Link to comment Share on other sites More sharing options...
CarnivalOfFear Posted May 31, 2012 Author Share Posted May 31, 2012 (edited) my coding knowledge is limited so sorry if I get this wrong. so it should look like so? EDIT: else if doesn't seem to want to save so I changed it to endif. scn 00DeathSCRIPT begin onDeath if getStage expanding00 == 20 setStage expanding00 30 endif if getStage expanding00 == 10 setStage expanding00 20 endif end Edited May 31, 2012 by CarnivalOfFear Link to comment Share on other sites More sharing options...
Jeux Posted May 31, 2012 Share Posted May 31, 2012 does the "return" function still work for GECK scripting? It did for Oblivion....because if so, that might make your if statements simplistic as you could just terminate the entire script process once one value is true. But that might now apply here, dunno. Link to comment Share on other sites More sharing options...
viennacalling Posted May 31, 2012 Share Posted May 31, 2012 my coding knowledge is limited so sorry if I get this wrong. so it should look like so? EDIT: else if doesn't seem to want to save so I changed it to endif. scn 00DeathSCRIPT begin onDeath ... end Well, I copied and pasted your script into the Geck and it didn't save. Then I remembered I didn't create a quest called expanding00, so I went and did that. Then I copied and pasted your script again and it saved. Having the script name start with 00 is still, as Jeux mentioned, a bad idea. Also try using Geck PowerUp which can show script errors. In summary: 1. Create your references (e.g. expanding00) before you use them in your scripts.2. Don't use numbers at the beginning of any names of things you create.3. (Optional) Use add ons like Geck PowerUp or Cipsis's Script Validator. Link to comment Share on other sites More sharing options...
CarnivalOfFear Posted June 1, 2012 Author Share Posted June 1, 2012 my coding knowledge is limited so sorry if I get this wrong. so it should look like so? EDIT: else if doesn't seem to want to save so I changed it to endif. scn 00DeathSCRIPT begin onDeath ... end Well, I copied and pasted your script into the Geck and it didn't save. Then I remembered I didn't create a quest called expanding00, so I went and did that. Then I copied and pasted your script again and it saved. Having the script name start with 00 is still, as Jeux mentioned, a bad idea. Also try using Geck PowerUp which can show script errors. In summary: 1. Create your references (e.g. expanding00) before you use them in your scripts.2. Don't use numbers at the beginning of any names of things you create.3. (Optional) Use add ons like Geck PowerUp or Cipsis's Script Validator. I got the script working and ill keep the 00 thing in mind. every tutorial i've watched they always use 00 to place it at the top of the list for east access but AA should also work. Link to comment Share on other sites More sharing options...
luthienanarion Posted June 1, 2012 Share Posted June 1, 2012 Instead of prefixing forms with "00" or "aaa" as most do, just expand the Form ID column (to the right of the Editor ID column) so that it is visible and click it to sort by Form ID. In descending order, all of your forms will be on the top of the list because they have the highest Form ID. Link to comment Share on other sites More sharing options...
Recommended Posts