View Single Post
  #1  
Old 05-31-2004, 04:48 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
with (npcs[index]) question

When I use the command it invokes the command on the NPC that the with (npcs[index]) command is on, not the NPC of the specified index.

For example, say that I had two NPCs, one with an index of 0, and the other with an index of 1, and I put in a command like this into NPC 0.

NPC Code:
if (playerenters) {
with (npcs[1]) {
destroy;
}
}



Then if I enter the level, it's the NPC with the index of 0 that gets destroyed, not the one with the index of 1.

Does with (npcs[index]) only work online, or am I just using it wrong?
__________________
Reply With Quote