kieranfoy Posted September 13, 2010 Share Posted September 13, 2010 I'm trying to make a scripted enchantment that only works if the player is sneaking when it's used, but I can't seem to find any suitable commands. Tell me, Nexus, is there a script command (or block, or whatever) to begin a script effect only if the PC is sneaking? Link to comment Share on other sites More sharing options...
ub3rman123 Posted September 13, 2010 Share Posted September 13, 2010 IsSneaking. 1 if they are, 0 if not.It's a function, so you'll have to use Gamemode or some equivalent along with an if. Link to comment Share on other sites More sharing options...
kieranfoy Posted September 13, 2010 Author Share Posted September 13, 2010 Sorry, not sure how to use game mode, or even what that is. Man, I have a lot to learn. Link to comment Share on other sites More sharing options...
ub3rman123 Posted September 13, 2010 Share Posted September 13, 2010 You can find all of the functions and blocktypes recorded here and here, respectively. All have been exhaustively researched. Link to comment Share on other sites More sharing options...
Maigrets Posted September 14, 2010 Share Posted September 14, 2010 You can do it the way I added the sneak function to my creature companions so they detect if you are sneaking. You need a reference which is "ref GetSelf" in this case, which refers to the lion. If you have other conditions you'll need to adjust "if" and "endif" blocks to tell it when to start and stop. scn AASherJaScript ref rEnemy short doOnce ref GetSelf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin OnActivate if IsActionRef player SetIgnoreFriendlyHits 1 if doOnce == 0 Player.addspell AASherJaSpell set doOnce to 1 endif if (GetSelf.GetForceSneak == 0) && (player.IsSneaking == 1) GetSelf.SetForceSneak 1 elseif (GetSelf.GetForceSneak == 1) && (player.IsSneaking == 0) GetSelf.SetForceSneak 0 endif if LionFollow == 1 set LionFollow to 0 Message "'Sher Ja, wait for me.'" elseif LionFollow == 0 set LionFollow to 1 Message "'Sher Ja, come with me.'" endif EvaluatePackage playGroup Idle 1 else activate endif end That should get you started. :) Link to comment Share on other sites More sharing options...
Recommended Posts