Hi all,
I'm a scripting noob and I have noobish question.
I've noticed that most of the loops that I see here uses a temporary NPC int variable. Is there a reason why it seems like it is preferred?
I'm currently writing a script that will triggers a loop via OnNPCKillEvent: that goes on to more blocks of script, functions and sql queries etc.
Here's the array:
I would like to use:
.@c
as the index for:
.mvp_mobid[.@c]
Buuuuuut, I don't want the value of
.@c
to change because another player triggers the loop and get my data all mixed up.
I could, in theory transerver the value to a more personal character variable:
set @index, .@c;
My question is, why do I not see people use temporary int character variable instead of temporary int NPC variable?