oc3 Posted June 21, 2014 Share Posted June 21, 2014 I want to have an area that is protected by garlic to keep vampires out. Is it possible? How can I make it where they will not go there even if they are pursuing me? It is in a cave, so I can't take advantage of doors. I searched the forums and came up with nothing. Thanks for the help. Link to comment Share on other sites More sharing options...
Legotrash Posted June 21, 2014 Share Posted June 21, 2014 I thought of something but let me ask you first,is there a chance that vampires could appear in the cave while you're away? (either by spawning or any other way)Other than that,we know the chance that they might get in by chasing you. What other possibilities are there? Just trying to tackle every possible problem beforehand. Link to comment Share on other sites More sharing options...
kastano Posted June 21, 2014 Share Posted June 21, 2014 (edited) you can surround the area you want with collision boxes -Dungeons\Misc\CollisionBox01.NIF- ,and enable disable them when certain conditions are met (perhaps with a trigger zone) another one is to put a script (with search loop) in an object like a special garlic or a trigger zonesth like ScriptName AAAVampireHaterGarlicSref HaterGarlicref AllergicVampireBegin Gamemodeset HaterGarlic to getself ;this makes the object containing the script to be the HaterGarlicset AllergicVampire to GetFirstRef 35 1 ;35 is npc thewhile (AllergicVampire)if AllergicVampire getisRace.Vampirerace == 1AllergicVampire.SetActorValue confidence 0;this will propably make them flleAllergicVampire.addsript package XXXXXX ;or make a package to lead them to a pointendifset AllergicVampire to GetNextRef ;continue to next npc;AllergicVampire.evp ;if you choose to add a packageloop in addittion you may put some conditions in the script likeif player.isincombatif player.getdistance HaterGarlic < 400 orif HaterGarlic.getdistance AllergicVampire < 400 or bothThis script propably wont run is only to demonstrate the idea Edited June 21, 2014 by kastano Link to comment Share on other sites More sharing options...
oc3 Posted June 21, 2014 Author Share Posted June 21, 2014 @Legotrash,The cave in question has several vampires that will spawn there. They will already be there when the player arrives. I have a small area of the cave that is meant to be a safe area where you can retreat to so that the vamps will not follow you there. Link to comment Share on other sites More sharing options...
oc3 Posted June 21, 2014 Author Share Posted June 21, 2014 @Kastano, The collision box idea might work to some extent, but would just be an invisible barrier. The vampires would just look like they are running in place when they hit it. I would like them to just halt and stand there, still able to cast spells or other ranged attacks. If their confidence was changed to 0 and they fled, is it possible to have their confidence return to normal in a set amount of time? If so, that may be OK. Thanks Link to comment Share on other sites More sharing options...
Legotrash Posted June 21, 2014 Share Posted June 21, 2014 In the safe area's cell? Sorry for the questions but that might help to avoid possible pitfalls. :D Kastano posted first his idea so if you want,go with that. I don't know how good mine is. I can tell you that it'd definitely need some tweaks/corrections. There's no way to avoid mistakes,especially without working on it. :P Link to comment Share on other sites More sharing options...
oc3 Posted June 21, 2014 Author Share Posted June 21, 2014 In the safe area's cell? Sorry for the questions but that might help to avoid possible pitfalls. :D Kastano posted first his idea so if you want,go with that. I don't know how good mine is. I can tell you that it'd definitely need some tweaks/corrections. There's no way to avoid mistakes,especially without working on it. :tongue:If I understand things correctly they are in the same cell. The cave is all one interior location. Any ideas? Link to comment Share on other sites More sharing options...
Legotrash Posted June 21, 2014 Share Posted June 21, 2014 This is something I haven't tried personally but I think it'll work: Make your main script disable that specific "leveledcreature" static(or statics if there are more) that spawns the vampires inside the cave. If you'll do that then also make your main script,upon saving,enable them (to keep the save files clean). When it's back in gamemode and can go back on having them disabled. Can't post a script right now,it's a bit late and I'm tired. If you'll need further help then post here and we'll take it from there. Link to comment Share on other sites More sharing options...
kastano Posted June 22, 2014 Share Posted June 22, 2014 ok i made a test.espit doesnt seem to behave very welli place a tomb with a script attached in burren cave(the cave between imperial city and cheydinhall)run untill you find the two tombs and stay there and see Link to comment Share on other sites More sharing options...
kastano Posted June 22, 2014 Share Posted June 22, 2014 there are two scriptsone in an object (activator) ScriptName AAAVampireHaterGarlicSshort activatedref HaterGarlicref RVampireBegin Gamemodeif activated == 0if player.GetInCell BarrenCave == 1set activated to 1set HaterGarlic to getself ;this makes the object containing the script to be the HaterGarlicelseif player.GetInCell BarrenCave != 1set activated to 0endifendifif activated == 1if (HaterGarlic.getdistance player < 1200 && activated == 1)set RVampire to GetFirstRef 35 1 ;35 is npc thewhile (RVampire)if (RVampire.GetInFaction VampireFaction && RVampire.GetItemCount AAAHGarliceffectToken == 0 && RVampire.getdistance HaterGarlic < 1000 )RVampire.additem AAAHGarliceffectToken 1endifset RVampire to GetNextRef ;continue to next npcloopendifendifend and one in a token which is added to vampire with a timer ScriptName AAAGarlEffref meownerPfloat timershort confVarbegin onaddset timer to ( timer + GetSecondsPassed )set meownerP to GetContainerset confVar to meownerP.getAv confidencemeownerP.RemoveScriptPackage AAAAGVAMPfleemeownerP.AddScriptPackage AAAAGVAMPfleemeownerP.SetActorValue confidence 0meownerP.evpendbegin gamemodeif (timer > 10 || meownerP.getdistance player > 1500 )meownerP.RemoveScriptPackage AAAAGVAMPfleemeownerP.SetActorValue confidence confVarmeownerP.evpremovemeendifend and a package These need to be developed more Link to comment Share on other sites More sharing options...
Recommended Posts