Screen State Carryover?
#1
Posted 15 May 2011 - 06:28 PM
#2
Posted 15 May 2011 - 07:44 PM
You'll have to put an enemy at the end of the puzzle and use enemies->secret, enemies->item, and screen state carryover to the screen you want.
#3
Posted 15 May 2011 - 07:48 PM
Could I make a switch appear, and then make Link step on it, making that permanent and undoing the switch in the other room?
#4
Posted 15 May 2011 - 08:23 PM
#5
Posted 15 May 2011 - 08:30 PM
Thank you!!
#6
Posted 15 May 2011 - 09:07 PM
#7
Posted 15 May 2011 - 10:38 PM
const int PlaceholderNum = 9;
int i;
bool isBlockInt(int TInt){
if(TInt==1 || TInt==2) return(true);
else if(TInt>=47 && TInt<=65) return(true);
else return(false);
}
bool isBlock(int x, int y){
if(isBlockInt(Screen->ComboF[ComboAt(x, y)]) || isBlockInt(Screen->ComboI[ComboAt(x, y)])) return(true);
else return(false);
}
bool BlockOn(){
for(i=1; i<=32; i++){
ffc TFFC = Screen->LoadFFC(i);
if(TFFC->Script==PlaceholderNum && !isBlock(TFFC->X, TFFC->Y)) return(false);
}
return(true);
}
ffc script Placeholder{
void run(){
while(true){
Waitframe();
}
}
}
ffc script BTrigger{
void run(){
while(true){
if(isBlock(this->X, this->Y) && BlockOn()){
for(i=1; i<=Screen->NumNPCs(); i++){
npc deadman = Screen->LoadNPC(i);
deadman->HP = 0;
}
Quit();
}
Waitframe();
}
}
}
const int PlaceholderNum is the number of the script slot to which the Placeholder script is assigned.
To use this, have exactly one enemy (probably a Trigger enemy) on the screen. Put your triggers where you want them, then add one that is inaccessible to the blocks. Put an FFC with the BTrigger script on the first accessible trigger, then put Placeholder script FFCs on all of the other accessible triggers.
Edited by Isdrakthül, 16 May 2011 - 08:24 PM.
#8
Posted 16 May 2011 - 10:40 AM
#9
Posted 16 May 2011 - 05:28 PM
When making the screen, add one block trigger more than you need in a place that the blocks can't reach.
Select one of the block triggers that the blocks can reach. Put an FFC exactly on top of it and assign the BTrigger script to the FFC.
Now do the same for all of the other triggers that can be reached by the blocks, but assign the Placeholder script to the FFCs instead of the BTrigger.
Now put some sort of enemy somewhere on the screen. This will be killed when the blocks are pushed onto the triggers with FFCs on them. Do not use any other enemies.
Now set the appropriate flags. In this case, use enemies->secret and enemies->item along with a Screen State Carryover to the screen you want, as MoscowModder said.
#10
Posted 16 May 2011 - 05:49 PM
LINE 33: SYNTAX ERROR: UNEXPECTED SCRIPT, EXPECTING IDENTIFIER, ON TOKEN SCRIPT
FATAL ERROR P00: CAN'T OPEN OR PARSE INPUT FILE!
--PRESS A KEY--
What's wrong?
#11
Posted 16 May 2011 - 06:06 PM
#12
Posted 16 May 2011 - 06:09 PM
#13
Posted 16 May 2011 - 06:40 PM
#14
Posted 16 May 2011 - 07:12 PM
Edited by Lynker, 16 May 2011 - 07:14 PM.
#15
Posted 16 May 2011 - 07:19 PM
I hope that the problem isn't what I think it is.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users