Razgreeze Posted October 19, 2009 Share Posted October 19, 2009 I'm trying to make a small mod that allows me to go invisible when I press 'C' as long as I have a certain item. So far I believe that it is a key binding issue but I'm not certain. Below is my code. SCN InvisibilityScript short sKeyPressed == 46short sActive == 0Begin onAdd player if (sKeyPressed)if (sActive == 0)player.addspell testinvisShowMessage InvisMSGelseplayer.removespell testinvisShowMessage InvisoffMSGendifendif End If anyone has any suggestions how I could resolve this problem or something else I may interrupt the stealth, I'd be glad to hear it. Other Info: InvisMSG/InvisoffMSG just say that it has been activated or deactivated.testinvis has a duration of 15 seconds and a magnitude of 10%.46 is what I believe is the # for C, please correct me if I am wrong. Link to comment Share on other sites More sharing options...
Cipscis Posted October 20, 2009 Share Posted October 20, 2009 Here's my reply from your thread on the official GECK forum:You want to use IsKeyPressed:ScriptName InvisibilityScript int bIsCPressed Begin GameMode if bIsCPressed != IsKeyPressed 46;C set bIsCPressed to bIsCPressed == 0 if bIsCPressed if player.IsSpellTarget TestInvis player.AddSpell TestInvis ShowMessage InvisMSG else player.RemoveSpell TestInvis ShowMessage InvisOffMSG endif endif endif EndCipscis Link to comment Share on other sites More sharing options...
Recommended Posts