Stealthy Problem - Triggering switch upon certain button usage?

● ARCHIVED · READ-ONLY
Started by Dymdez 1 posts View original ↗
  1. Just finishing my stealth skill for my ABS that I was discussing a few posts ago and I realized one major problem that I am hoping the community could help me fix.

    When my player is in "stealth mode" he turns into a shadow (and thanks to Engr. Adi, cannot use the sprint function). The player remains as a shadow until 25 steps are taken. As a shadow, enemies cannot detect the player. However, the player still can attack the enemies without the enemies noticing or doing anything about it (this is the problem). I want to make it so when the player attacks while stealthed, the stealthed ability is shut off and the game returns to normal (like it would after 25 steps are taken).

    Would it be possible to make it so when the player attacks, if he is stealthed, the "shut-off stealth" switch can be set to ON.

    Basically, the question is can I make it so when the player is invisible, if he attacks, he is no longer invisible. Thanks.

    Additional information: I am using Falcao's Pearl ABS v3 found: HERE

    To attack in my game you use the "A" button, in the script it looks like this "Weapon   =  [PearlKey::A,      'A']            # Weapon usage"

    --

    Reading this post over, I realize it is confusing, I can answer any and all questions to clear things up.

    TL:DR - Can you make a button input ("A") a trigger?