PDA

View Full Version : Permanent pushblock secrets?



Majora
01-06-2013, 01:59 PM
Overworld DMap. I can screen-flag it to interior so that's not a problem. But how would I otherwise accomplish this?

I want to have a pushable object blocking a shortcut, that you can only push when you take the long way, but I don't want the block to reset and keep the shortcut open permanently.


2.5/official release, mind you.

Lightwulf
01-11-2013, 01:13 PM
The best way that I can think of doing this is have the block pushed onto a pushblock trigger and have the secret be permanent. Not entirely sure if it will work, but it might.

If only there were a way to assign a flag to the undercombo then this would be easy...

Moosh
01-11-2013, 01:53 PM
Try this. I made this for a custom type of push block so IDK if it'll work.
D0 is the number of the flag that goes on the trigger spots.
Set D1 to 1 to make the secret permanent.

ffc script FlagCheck{
bool CheckFlag(int flag){
for(int i=0; i<176; i++){
if(Screen->ComboF[i]==flag||Screen->ComboI[i]==flag){
if(!Screen->isSolid(ComboX(i)+8, ComboY(i)+8))return true;
}
}
return false;
}
void run(int flag, int perm){
while(CheckFlag(flag)){
Waitframe();
}
Screen->TriggerSecrets();
Game->PlaySound(SFX_SECRET);
if(perm==1)Screen->State[ST_SECRET]=true;
}
}

Majora
01-11-2013, 02:40 PM
I think I have that script already, haha. But thanks, it seems like ZC is just too wild to tame. So scriptblock it is!