KittymirCuten Posted August 11, 2020 Share Posted August 11, 2020 (edited) Short version is I'm trying to add a new mechanic to JurassicNightTerrors as I am momentarily hiding it til I iron old bugs out. This new mechanic involves stealthed enemies. Berne Vampires will have an even more powerful cloak, non-Berne vamps and werewolves will have a somewhat weaker cloak, DB-Assassin's, Elite Bandits who stalk rich players, and various creatures such as scamps ghosts small slaughterfish and dwemer spiders that strike me as sneaky will have something in between. There are three special dwemer crossbows with a screen interface hovering above it, which scans for invisible enemies and decloaks them when it is equipped and drawn. Dwemer Lockbreaker, Grand Dwemer Lockbreaker, and Shadowsight Crossbow. (Each have unique models btw). This invisibility effect also increases their agility luck and health by a bit. So the script idea is when you have none of these crossbows equipped and drawn the cloak effect gets applied to a lot of these creatures, then I'll make an opposite effect where equipping either one of the three both gives slight night vision and removespells these characters and creatures cloak ability. Anyways here's the script itself, part of it. Short NyxPaSpawnFixahUh if ( Player->HasItemEquipped "AANyxPanthXBoNormul" == 0 ) if ( Player->HasItemEquipped "AANyxPanthXBoCryo" == 0 ) if ( Player->HasItemEquipped "AANyxPanthXBoCryoUber" == 0 ) AANYxPanthRobbr->AddSpell "AAAANyxPaBandiClo" ANyxPanthancestor_ghost->AddSpell "AAAANyxPaBandiClo" ancestor_ghost->AddSpell "AAAANyxPaBandiClo" ancestor_guardian_fgdd->AddSpell "AAAANyxPaBandiClo" ancestor_guardian_heler->AddSpell "AAAANyxPaBandiClo" ancestor_ghost_Variner->AddSpell "AAAANyxPaBandiClo" BM_wolf_skeleton->AddSpell "AAAANyxPaBandiClo" wraith_sul_senipul->AddSpell "AAAANyxPaBandiClo" centurion_spider_bbot7->AddSpell "AAAANyxPaBandiClo" centurion_spider_bbot3->AddSpell "AAAANyxPaBandiClo" centurion_spider_dead->AddSpell "AAAANyxPaBandiClo" centurion_spider->AddSpell "AAAANyxPaBandiClo" centurion_spider_tga2->AddSpell "AAAANyxPaBandiClo" centurion_spider_tga1->AddSpell "AAAANyxPaBandiClo" clannfear->AddSpell "AAAANyxPaBandiClo" scamp_creeper->AddSpell "AAAANyxPaBandiClo" scamp_mg_apprentice->AddSpell "AAAANyxPaBandiClo" scamp->AddSpell "AAAANyxPaBandiClo" gateway_haunt->AddSpell "AAAANyxPaBandiClo" BM_hircine_huntaspect->AddSpell "AAAANyxPaBandiClo" shalk->AddSpell "AAAANyxPaBandiClo" Slaughterfish_Small->AddSpell "AAAANyxPaBandiClo" Set NyxPaSpawnFixahUh to 0 Endif Endif Endif Which works fine... HOWEVER there are a few characters and NPCs that cause the script to not work for some weird reason. I know it's not caused by script length cause I tested it. I am also pretty sure I copied and pasted their ID's just right so I don't think that's the problem. And btw anything with a name like "NyxPa-(whatever)" is a custom mod specific object I made just fyi... And it's not just that stuff messing up the script. Here is what it looks like with them included... skeleton archer->AddSpell "AAAANyxPaBandiClo" ancestor_ghost_greater->AddSpell "AAAANyxPaBandiClo" centurion_spider_bbot1->AddSpell "AAAANyxPaBandiClo" Dahrk Mezalf->AddSpell "AAAANyxPaBandiClo" dwarven ghost_jeanne_U->AddSpell "AAAANyxPaBandiClo" dwarven ghost->AddSpell "AAAANyxPaBandiClo" ANyxPanskeleton archer->AddSpell "AAAANyxPaBandiClo" severa magia->AddSpell "AAAANyxPaBandiClo" Dandras Vules->AddSpell "AAAANyxPaBandiClo" I wondered if maybe the characters who have spaces in their names confused the script but I quickly found out that wasn't why. For some reason these specific NPCs and creatures cause the script to not compile if I attempt to add them to my stealthed enemies list. Can someone please explain what's going on with my script that I cannot seem to figure out? I'll credit you if your advice fixes the script btw. (I have more to add to this script, the removespell function for opposite If conditions, but if these creatures and NPCs don't work with the Addspell Condition I can't even get the start of the script working). Edit: I think I fixed it... I added the bugged object refs to an unaccessible dummy cell, and added quote marks to the name of every object with a space or underscore in the name. Edited August 11, 2020 by KittyBastetinati Link to comment Share on other sites More sharing options...
abot Posted August 11, 2020 Share Posted August 11, 2020 I think you keep on adding spells each frame with that script, you know, scripts usually loop forever e.g. use a state variableshort doneOnceif ( doneOnce ); do nothingelse dosomething set doneOnce to 1endif, see Morrowind Scripting For Dummies 9 for more examples/details Link to comment Share on other sites More sharing options...
KittymirCuten Posted August 11, 2020 Author Share Posted August 11, 2020 I think you keep on adding spells each frame with that script, you know, scripts usually loop forever e.g. use a state variable short doneOnceif ( doneOnce ); do nothingelse dosomething set doneOnce to 1endif , see Morrowind Scripting For Dummies 9 for more examples/details Each frame? Yikes. That can't be good for performance, thanks for warning me. Perhaps I could at least make it run every say twenty seconds instead. That'd at least be better than this going off every frame. Link to comment Share on other sites More sharing options...
Recommended Posts