Kill enemies-> FFCS
#1
Posted 03 January 2013 - 03:33 PM
That the script I want to give this function is placed on the screen but you can not see until it kills all enemies on the screen
Could it be possible?
#2
Posted 03 January 2013 - 03:36 PM
void run(int combo){
while(true){
if(Screen->State[ST_SECRET] == true){
this->Data = combo;
}
Waitframe();
}
}
}
Instructions: First, set the Enemies->Secret screen flag. Next, set the FFC you attack this script to a blank combo. Now go to the Arguments tab. Set D0 to be the combo number of the combo you want the FFC to look like after the enemies are killed.
#3
Posted 03 January 2013 - 03:42 PM
EDIT: Unexpected while, expecting lbrace, on token while
Edited by Cereal Guy, 03 January 2013 - 03:44 PM.
#4
Posted 03 January 2013 - 03:51 PM
Although I don't exactly appreciate being told "You should have tried" and given that face when I went out of my way to script something for you the very same minute you asked for it. <_<
#5
Posted 03 January 2013 - 03:56 PM
EDIT: It worked!! but the compilation, because when I kill all enemies the secret sounds sound but nothing appears.
Edited by Cereal Guy, 03 January 2013 - 03:59 PM.
#6
Posted 03 January 2013 - 04:14 PM
ffc script Cantseeme{
void run(int combo, int cset){
while(true){
npc n = Screen->LoadNPC(1);
if(n->HP == 0){
this->Data = combo;
this->CSet = cset;
}
Waitframe();
}
}
}
This time it has two arguments. D0 is the combo to turn into, D1 is the cset to use.
#7
Posted 03 January 2013 - 04:20 PM
#8
Posted 03 January 2013 - 04:31 PM
#9
Posted 03 January 2013 - 04:33 PM
#10
Posted 03 January 2013 - 04:50 PM
{
void run(int combo, int cset)
{
// Do nothing until all enemies are gone.
while(Screen->NumNPCs()>0)
Waitframe();
// Change FFC combo and cset.
this->Data = combo;
this->CSet = cset;
}
}
This script will scale with any number of enemies in any given room. As before:
Argument D0: Combo you want the FFC to change to.
Argument D1: CSet of the combo you want the FFC to change to.
Credit goes to Russ for his efforts to help you.
I recommend having Enemy -> Secret checked to play the secret sound when enemies are killed.
#11
Posted 03 January 2013 - 05:00 PM
#12
Posted 03 January 2013 - 05:02 PM
Edited by Cereal Guy, 03 January 2013 - 05:02 PM.
#14
Posted 03 January 2013 - 05:04 PM
Damn, it may not be permanent? D:
Oh, you want it permanent? Meaning that when you kill the enemies in the room, the secret will be there every time you come back even if they respawn?
Right now, the script just shows the secret if there are 0 enemies in the room. I'm assuming you will only use the FFC in rooms which have enemies to begin with, and you're only going to be using this in circumstances where you'd otherwise have Enemies -> Secret checked.
#15
Posted 03 January 2013 - 05:10 PM
void run(int combo, int cset){
while(true){
if(Screen->D[0] == 1){
this->Data = combo;
this->CSet = cset;
}
if(Screen->NumNPCs()>0){
Screen->D[0] = 1;
}
Waitframe();
}
}
}
This one should work and be permanent.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users