Jump to content

Photo

Couple of questions about 2.55 scripting

2.55 darkrooms liftgloves

  • Please log in to reply
2 replies to this topic

#1 Mephestrial

Mephestrial

    Newbie

  • Members
  • Real Name:Jeremiah
  • Location:Wisconsin

Posted 20 March 2024 - 01:09 PM

I have a few questions about some scripting issues I've been having in regard to new 2.55 features.

 

The first is related to detecting darkrooms with the new alttp/minish cap style darkrooms. I've been using Screen->Flags[SF_VIEW|SFV_DARKROOM] but I get nothing from it when using the new darkroom option. Am I just using it wrong or is there some other functions I should be using? The intended use in my quest is to slowly decrement a lantern fuel counter while in a darkroom and then remove the lantern item if the counter reaches zero. If no way currently exists to detect the new style darkroom I guess I could detect if one of the screen Script_1-5 flags are checked instead and manually set them for each darkroom.

 

The second is related to the new lift gloves. I'm trying to disallow certain other scripted actions if Link is currently carrying a combo around. I thought that the Link Action LA_LIFTING would be the best way to detect this but that seems to not work and I have not seen any other appropriate link actions such as a LA_CARRYING or anything similar. 

 

Any insight to solve these two problems would be appreciated.

 

 



#2 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 23 March 2024 - 01:40 AM

I've been using Screen->Flags[SF_VIEW|SFV_DARKROOM] but I get nothing from it when using the new darkroom option. Am I just using it wrong or is there some other functions I should be using?

The syntax wouldn't be `Screen->Flags[SF_VIEW|SFV_DARKROOM]`, it would be `Screen->Flags[SF_VIEW] & (1 << SFV_DARKROOM)`. But you can just use the standard `ScreenFlag` function instead, `ScreenFlag(SF_VIEW, SFV_DARKROOM)`.
 

The second is related to the new lift gloves. I'm trying to disallow certain other scripted actions if Link is currently carrying a combo around. I thought that the Link Action LA_LIFTING would be the best way to detect this but that seems to not work and I have not seen any other appropriate link actions such as a LA_CARRYING or anything similar.

`LA_LIFTING` is only the action while the player is actively lifting the object from the ground to above their head; not while they continue walking around (the way Action works would break everything if it did that). Instead, you can check `Hero->LiftedWeapon` to see if there is a weapon currently over the player's head.

#3 Mephestrial

Mephestrial

    Newbie

  • Members
  • Real Name:Jeremiah
  • Location:Wisconsin

Posted 23 March 2024 - 09:07 PM

That is extremely helpful, thank you!





Also tagged with one or more of these keywords: 2.55, darkrooms, liftgloves

6 user(s) are reading this topic

0 members, 6 guests, 0 anonymous users