I want the shooters to stop when all the other enemies, besides bubbles, are dead.
Kill shooters when other enemies are dead
Started by
Lemmy Koopa
, Jun 25 2010 02:05 AM
6 replies to this topic
#1
Posted 25 June 2010 - 02:05 AM
#2
Posted 25 June 2010 - 10:34 AM
What are shooters?
#3
Posted 25 June 2010 - 08:12 PM
The enemies that statues spawn, that shoot fireballs.
#4
Posted 26 June 2010 - 11:06 AM
CODE
ffc script KillShooters{
void run(){
while(!OnlyShooters()) Waitframe();
npc n;
for(int i=Screen->NumNPCs();i>=1;i--){
n = Screen->LoadNPC(i);
n->DeadState = 0; n->X = -256;
}
}
bool OnlyShooters(){
npc n;
for(int i=Screen->NumNPCs();i>=1;i--){
n = Screen->LoadNPC(i);
if(n->Type != NPCT_PROJECTILE)
return false;
}
return true;
}
}
void run(){
while(!OnlyShooters()) Waitframe();
npc n;
for(int i=Screen->NumNPCs();i>=1;i--){
n = Screen->LoadNPC(i);
n->DeadState = 0; n->X = -256;
}
}
bool OnlyShooters(){
npc n;
for(int i=Screen->NumNPCs();i>=1;i--){
n = Screen->LoadNPC(i);
if(n->Type != NPCT_PROJECTILE)
return false;
}
return true;
}
}
#5
Posted 26 June 2010 - 12:24 PM
I get this error
Edited by Hot Water Music man, 26 June 2010 - 12:24 PM.
#6
Posted 26 June 2010 - 12:49 PM
CODE
ffc script KillShooters{
void run(){
while(!OnlyShooters()) Waitframe();
npc n;
for(int i=Screen->NumNPCs();i>=1;i--){
n = Screen->LoadNPC(i);
if(n->Type == NPCT_PROJECTILE) n->X = 1000;
}
}
bool OnlyShooters(){
npc n;
for(int i=Screen->NumNPCs();i>=1;i--){
n = Screen->LoadNPC(i);
if(n->Type != NPCT_PROJECTILE || n->Type != add bubbles,traps etc...) //look in std.zh for values
return false;
}
return true;
}
}
void run(){
while(!OnlyShooters()) Waitframe();
npc n;
for(int i=Screen->NumNPCs();i>=1;i--){
n = Screen->LoadNPC(i);
if(n->Type == NPCT_PROJECTILE) n->X = 1000;
}
}
bool OnlyShooters(){
npc n;
for(int i=Screen->NumNPCs();i>=1;i--){
n = Screen->LoadNPC(i);
if(n->Type != NPCT_PROJECTILE || n->Type != add bubbles,traps etc...) //look in std.zh for values
return false;
}
return true;
}
}
You have to add in the NPC* constants (one for each enemy you don't want to kill) then it should work.
#7
Posted 27 June 2010 - 12:32 AM
Do I add the shooter enemy too? Because it compiles but does nothing.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users