gumballthechewy Posted March 7, 2007 Share Posted March 7, 2007 first off i dont if this is where i should post this. and if it isnt then where does it go? anyway im doing a script thats a one-hit-kill if done from behind and while you sneaking and undetected. this is the script: EDIT ok this is what the script looks like now...************************************scriptname 001backstabkillscript begin ScriptEffectStart if (GetDetectionLevel player <= 1) kill player endifend ************************************ but all it does is kill every one all the time no matter what. as is apperent im not worthy enough to be called a scripter as i lack the brain power and other smart things. so if anybody knows how to finish what i started it would be great! Link to comment Share on other sites More sharing options...
crazydave Posted March 7, 2007 Share Posted March 7, 2007 well Im not an expert on scripting either but I can see where you made your firsk mistake. The "Kill" command should be between the "If..." and "endif", thats why its killing every one. Thats all the advice i can give you. Link to comment Share on other sites More sharing options...
gumballthechewy Posted March 7, 2007 Author Share Posted March 7, 2007 ohhh ok ill try that. thanks for the advice. EDIT-nope it still kills even when your not sneaking. i need a line that make it so the only way its gonna do its job is if the char is sneaking and undetected. thank anyway. Link to comment Share on other sites More sharing options...
Abramul Posted March 7, 2007 Share Posted March 7, 2007 Use GetDetected player == 0 in addition to or instead of getlos player == 0. It makes sense, for instance, that a 100% Chameleoned actor could slit someone's throat even if standing in front of the person. Alternately, use GetDetectionLevel <= 1. If I understand the Detection Levels correctly, this will result in a kill provided that the actor doesn't think someone's there. However, "Lost" may be a special case (triggered, for instance, by an actor who was in combat casting Invisibility), in which case you'd want to use GetDetectionLevel == 1. Link to comment Share on other sites More sharing options...
gumballthechewy Posted March 7, 2007 Author Share Posted March 7, 2007 humm this sounds like it might work thanks a lot. ill go check it out right now. EDIT-well now it says warning: line 4 missing parameter actor. what do i do :S (btw the script at the top now shows what it looks like when the warning comes up) Link to comment Share on other sites More sharing options...
Abramul Posted March 7, 2007 Share Posted March 7, 2007 Eh, should be GetDetectionLevel player <= 1. Sorry about that. You will need to have the kill command INSIDE of the if statement, like so: if [condition]killendif You may wish to use kill player in order for the death to be properly attributed. You should test this on a bandit to make sure it doesn't count as a murder. Additionally, you might want to set the enchantment to ignore Absorb/Reflect. Link to comment Share on other sites More sharing options...
gumballthechewy Posted March 7, 2007 Author Share Posted March 7, 2007 oh ok i get it now. gonna go make it work (hopefuly) EDIT-arg it is still not working and now my brain is gonna pop (this is why i didnt try to become a scripter in the first place.) so anyway the script now looks like the one in the first post. btw i appreceat all the help Link to comment Share on other sites More sharing options...
Povuholo Posted March 8, 2007 Share Posted March 8, 2007 begin ScriptEffectStartif kill (GetDetectionLevel player <= 1)kill playerendifend What is that kill (in bold) doing there? Remove it. :) Link to comment Share on other sites More sharing options...
gumballthechewy Posted March 8, 2007 Author Share Posted March 8, 2007 oops that was accident it wasnt there in the script sorry ok now it looks like the above no messing up this time. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.