Re: Help with NPC script.
Though you seem to have solved the compilation problem, a quick note of reference:
The bool or int or whatever in front of a ZScript function in the manual is there to indicate its type. You don't include it in the script!
As for the second problem, I'm not sure what you mean by "The Gibdo warps to combo 2 on the grid".
Do you mean that the FFC (or, rather, the shadow?) is moving to the upper-left corner of the screen when the gibdo dies?
I think this is what you need:
Code:
ffc script Gibdo2{
void run(){
npc Shadow = Screen->LoadNPC(1);
npc Gibdo = Screen->LoadNPC(2);
while(Shadow->isValid() && Gibdo->isValid()){
Shadow->X = Gibdo->X + 32;
Shadow->Y = Gibdo->Y;
Waitframe();
}
//if we get here, one of the monsters have died
//so, let's kill the one that didn't!
if(Gibdo->isValid()) Gibdo->HP = 0;
if(Shadow->isValid()) Shadow->HP = 0;
}
}
Re: Help with NPC script.
Actually, the gibdo is invincible. The shadow is it's weak spot.
Therefore, when you kill the shadow the gibdo moves to combo 2 on the grid or rather position (32,0)
Re: Help with NPC script.
Oh, I see what's going on... Hmm, I think this might be a bug.
I bet that when the shadow dies, the gibdo moves up in the enemy list to take spot #1. The "Shadow" pointer, which was pointing at spot #1 now points at the gibdo in that spot.
Although, that said, my version of the script *should* kill both if either one dies...
Re: Help with NPC script.
Which would be awesome because that would mean I could add bubbles or something.
Also, a modified version of this script might just work to allow me to further manipulate bosses won't it. Oh god, now we can have some fun. Patras on Crack? :scared:
Re: Help with NPC script.
Damn it, now it doesn't follow the Gibdo, let's try your script then.
EDIT: Sorry for the double post, Tried you script, same behavior. It just sits there doing nothing anyways. I'm going to set it to true and just use ring leader and it can run if it's dead