HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Question on Variables

05-05-2004, 03:55 AM#1
Shinzaku
I was wondering, when using a variable, does each player have their own instance of that variable? Or will I have to recreate the variable AND the triggers to go to each corresponding player? That would be just annoying...

But then again, could I just use arrays? :0
Which would be best? xD

Thankies to anyone who responds in advance. ^^;
05-05-2004, 04:20 AM#2
Deathperception
It depends if you want to store something like how much gold the player has in a bank you would need to create separate variables or one variable and some arrays.

But not if you set the variable in the trigger and use it in the same trigger it only needs it for a short time before it can be changed to something else.

For instance like to display a players name in a chat message you would set the variable to the players name then no its not necassary because the information in the variable can be reproduced or reset each time the trigger is run.

But with a bank account you can't simply reproduce it so you would need multiple variables or arrays to permanently store the data.
05-05-2004, 05:58 AM#3
th15
Just use arrays. Simplest way to do it.

The variable would look something like Set variable SizeofButt[playerr number of picked player] = SizeofButt[player number of picked player] + 1
05-05-2004, 06:31 PM#4
Deathperception
Whoa my own explanation kinda confused me ^_^ . Yeah just use arrays :D .