TonyBalony1960 Posted January 25, 2012 Author Share Posted January 25, 2012 (edited) Wooooohooooooo! I did it. OK, I finally stopped trying to kill the damsel and followed FORE's advice and added something else that was eluding me. This is what I came up with: ScriptName VampireLordXScript ref CassandraRefVar ref VampireRefVar short VLXIsDead Begin GameMode if CassandraRefVar else set CassandraRefVar to "11101BAD" ; Editor ID set VampireRefVar to "00010DAB"; Editor ID endif if (VLXIsDead !=1) if (CassandraRefVar.getav paralysis !=1) CassandraRefVar.setAV paralysis 1 CassandraRefVar.SetUnconscious 1 endif endif if (VampireRefVar.GetDead) if (VLXIsDead !=1) set VLXIsDead to 1 CassandraRefVar.setAV paralysis 0 CassandraRefVar.SetUnconscious 0 endif endif End GameMode I was trying to kill her at first because even when she was paralyzed she would do greetings, etc., and had her eyes open and blinked them. Then I remembered something I started with, "SetUnconscious". I had stopped using it when they would get up after 10 seconds and then fall unconscious again. Well, between "SetAV Paralysis 1" and "SetUnconscious 1" she looked and acted perfectly unconscious. And by using a variable to set whether our villain was dead or not, it became easier to script the whole thing. Something else I learn while doing this...resist using "&&" in "if" statements. Nested "if" statements seemed work better, for me anyway. Also, don't forget to make your references persistent. I'd really like to thank everyone who help, "Fore" and "PrettyMurky ", or I'd never have figured this out. Thanks again. Edited January 25, 2012 by TonyBalony1960 Link to comment Share on other sites More sharing options...
TonyBalony1960 Posted January 25, 2012 Author Share Posted January 25, 2012 Decided that my script could use a bit of cleaning up. This is the result and I tested it and it works: ScriptName VampireLordXScript ref CassandraRefVar ref VampireRefVar short VLXIsDead Begin GameMode if (VLXIsDead !=1) if CassandraRefVar !="11101BAD" set CassandraRefVar to "11101BAD" ; Editor ID set VampireRefVar to "00010DAB"; Editor ID endif if (CassandraRefVar.getav paralysis !=1) CassandraRefVar.setAV paralysis 1 CassandraRefVar.SetUnconscious 1 endif if (VampireRefVar.GetDead) set VLXIsDead to 1 CassandraRefVar.setAV paralysis 0 CassandraRefVar.SetUnconscious 0 endif endif End GameMode Thanks again all!!! Cya. :biggrin: Link to comment Share on other sites More sharing options...
Recommended Posts