trying to build a custom level 9-esque gate. link collects three key items, and heads onto a screen where a small quake and secrets are triggered once only. been trying to search for posts that could have anything on this so i'm just throwing it to the crowd in the hope that someone can figure it out.
once more i am trying to fiddle with coding at 3 am. here's what i've written so far that works; it's kind of mangled from a few example scripts here:
const int KEY_ITEM_1 = 155; const int KEY_ITEM_2 = 156; const int KEY_ITEM_3 = 157; ffc script DungeonCheck { void run() { if(Link->Item[KEY_ITEM_1] && Link->Item[KEY_ITEM_2] && Link->Item[KEY_ITEM_3]) { Game->PlaySound(83); Screen->Quake = 120; Link->SwordJinx = 120; Link->ItemJinx = 120; Game->PlaySound(82); } else { Quit(); } } }
at this stage i'm looking for a way to trigger secret combos on the screen, as well as ensuring the script activates once. i thought i could use Game->SetComboFlag to trigger stuff, but i'm a bit confused with the documentation in std + zscript. similarly, i tried cannibalising a one-time message script to ensure that the script would activate just once. however, i realised it'd only work if the player is on the screen for the first time with all three key items.