Hi, just a little script required.
Basically I just want the item to not be present when you enter the screen but to appear when secrets are triggered.
Or maybe I'm dumb and didn't realise this was a thing already.
Posted 26 September 2019 - 08:43 AM
Hi, just a little script required.
Basically I just want the item to not be present when you enter the screen but to appear when secrets are triggered.
Or maybe I'm dumb and didn't realise this was a thing already.
Posted 26 September 2019 - 04:02 PM
Posted 26 September 2019 - 04:38 PM
Yeah, I thought of that, and if this doesn't work, then I'll probably do that.
Posted 28 September 2019 - 08:50 AM
Use a treasure chest combo. Make it appear with secrets, via Enemies->Secret.
Posted 28 September 2019 - 12:36 PM
It's actually funny how after 10 years this script still doesn't exist for public use.
I'll post it when I'm not distracted and if no one beats me to it.
Edited by Avaro, 28 September 2019 - 12:37 PM.
Posted 30 September 2019 - 12:54 AM
ffc script secretitemff { void run(int theItemID, int reg) { while(!Screen->State[ST_SECRETS]) { Waitframe(); } if (Screem->D[reg]&1) { Quit(); } item theItem = Screen->CreateItem(theItemID); theItem->X = this->X; theItem->Y = this->Y; //if version >= 2.55, uncomment the next two lines //theItem->PScript = Game->GetItemScript("collected_scrmsg"); //theItem->InitD[0] = reg; Quit() } } item script collected_scrmsg { void run(int reg) { Screen->D[reg] |= 1; } }
ffc script secretitemff { void run(int theItemID, int reg) { while(!Screen->State[ST_SECRETS]) { Waitframe(); } if (Screem->D[reg]&1) { Quit(); } item theItem = Screen->CreateItem(theItemID); theItem->X = this->X; theItem->Y = this->Y; theItem->Misc[12] = 12345.6789; bool quit; while(1) { quit = true; for ( int q = Screen->NumItems(); q > 0; --q ) { item testItem = Screen->LoadItem(q); if ( testItem->Misc[12] == 12345.6789 ) quit = false; } if ( quit ) { Screen->D[reg] |= 1; break; } Waitframe(); } Quit() } }
Posted 30 September 2019 - 08:04 AM
Thanks!
Sorry, yeah, meant it for 2.53
The top one should work, right? Can't check for a few hours. Any specific setup needed or is it just setting the ffc script on the screen where I put the item?
Posted 02 October 2019 - 01:16 AM
Thanks!
Sorry, yeah, meant it for 2.53
The top one should work, right? Can't check for a few hours. Any specific setup needed or is it just setting the ffc script on the screen where I put the item?
You want the bottom one in 2.53. The top one, in 2.53, would require placing that collect script on the item, whereas the bottom one is only the ffc script and no extra set-up: It just uses far more instructions.
Position the ffc where you want the item to spawn.
It's actually funny how after 10 years this script still doesn't exist for public use.
I'll post it when I'm not distracted and if no one beats me to it.
I'd be curious how much these differ from whatever you wrote.
0 members, 0 guests, 0 anonymous users