Jump to content

Photo

If L button is pressed Link's hp is reduced by 1 possible in Item


  • Please log in to reply
2 replies to this topic

#1 LikeLike888

LikeLike888

    Spicy food lover!!

  • Members
  • Real Name:Jason
  • Location:North America

Posted 24 February 2016 - 08:05 PM

If yes how (with coding) would I accomplish this please? Thank you.



#2 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 24 February 2016 - 08:16 PM

If L button is pressed Link's hp is reduced by 1 possible in Item

 

What do you mean by "in Item"? You mean "if" Link owns a given item?



#3 Yuuki

Yuuki

    Recipient of Ways

  • Members
  • Pronouns:She / Her

Posted 19 March 2024 - 12:48 PM

Here you go:

#include "std.zh"

item script hurtLink
{
    void run()
    {
        if( Link->InputL ) Link->HP--;
    }
}

After compiling, go to the Item tab in the Assign Compiled Script window and assign hurtLink to Slot 1.  Then in the Item Editor, select Bait and click Edit.  Go to the Scripts tab, Item subtab, and set the Action Script dropdown to hurtLink.  Then place Bait somewhere on the screen.

Test the quest, pickup and equip the bait, then hold L while using it.  You should see Link take damage.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users