Hey bigjoe, I just realized that if you change it to eweapon instead of lweapon and changed it to flame, then you just turned any enemy into a fire wizzrobe!



Quote Originally Posted by Joe123 View Post
Like that flamethrower script you made.
It's about the only script that simple that I just can't understand.

It's really quite simple. You have a loop like this:

Code:
for(int i=Screen->NumNPCs();i>1;i--){
Now lets assume there are 100 enemies on the screen, So i=100 right? As the loop runs down to 1 (but not 1!) you've just run through every number that is a screen enemy, exept 1. So Screen enemies 2-100 could be pointed to by adding something like this inside the loop:

Code:
npc enemy = Screen->LoadNPC(i);
From here we can do whatever we want to each of those 99 NPCs on the screen every frame. ...Like this:


Code:
for(int i=Screen->NumNPCs();i>1;i--){
    npc enemy = Screen->LoadNPC(i);
    enemy->HP=100;
}
Now Link is gonna find it pretty hard to kill those enemies if they keep regenerating themselves.

Make sense.