Quote:
Originally posted by nyghtGT
can someone explain the following code to me please ... i dont understand it .... Explain all parts and what they do please ...
NPC Code:
NPC Code:
if (wasshot) {
for (i=0; i<npcscount; i++)
callnpc i,swimming;
}
|
basically it calls every npc on that level if the npc was shot and gives it a swimming thing
and inside the other npcs you can say
if(swimming){
//coding
}
so humm lets say the npc calling that code is a person npc
and it gets shot
then the person npc would call all the npcs and set
swimming
then in the other npcs that you want it to effect you say
if(swimming){
}
and do whatever you want in that coding once the person npc gets shot