munchester Posted March 19, 2009 Share Posted March 19, 2009 I'm trying to make a very simple add-on to the mister sandman perk so that at 2nd rank you're able to "assassinate" characters that aren't sleeping. I've added the 2nd rank of the perk to be identical to the vanilla sandman perk and just changed the last line under target conditions from GetSleeping != 0.00 to GetSleeping == 0.00 (also tried GetSleeping != 1.00). This makes the menu show up when people aren't sleeping, except that now it seems to be ignoring all the other conditions as well. For example, when I activate a door to open/close it I get the popup asking if I want to kill the door or open it. Killing the door nets me 50xp and is repeatable, but it's not really the result I'm looking for. I can't understand why this is happening, but then again I'm pretty new to scripting and modding FO3 in general. I noticed that if I didn't remove the line in the script section "StartMisterSandman Player" then my character would start the sandman animation, but never come out of it. I replaced that line with a "Kill" statement, which works except that I don't alert other members of the same faction if I'm not hidden. I'm not too worried about this problem though because I think I can come up with a workaround on my own with enough effort, but any help on this would be much appreciated. Link to comment Share on other sites More sharing options...
Cipscis Posted March 19, 2009 Share Posted March 19, 2009 Because GetSleeping will return a value of 0 for all non-Actor references, you'll want to add a condition of "IsActor == 1" as well so that the menu will only appear for Actors. If you don't want it to work for creature, then use a condition of "GetIsCreature == 0" as well. Cipscis Link to comment Share on other sites More sharing options...
munchester Posted March 19, 2009 Author Share Posted March 19, 2009 Thanks! That did the trick. I was looking at using GetHealthPercentage > 0 to make this work but IsActor makes a lot more sense. GetIsCreature is part of the vanilla definition so it was already in there, but thanks for the suggestion. If anyone cares, I came up with this script for the other problem I had: If (GetDetected Player >= 0) SendAssaultAlarm else RewardXp 50 endif Kill ModPCMiscStat "Sandman Kills" 1 This seems to work as expected: if there is another actor around to see the crime or you're detected by the actor you're assassinating, they will "yell for help" as they're dying and alert the guards. Of course it's horribly over-powered, but oh so much fun. Thanks again! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.