Game Development Community

Scripting question

by Nelson A. K. Gonsalves · in Torque Game Engine · 09/19/2001 (12:48 am) · 2 replies

Here is my problem

I got:

for (%i=1; %i <= %invname.slots; %i++)
{
%thisSlot = (%invname.Slot1);
}

I want that Slot1 to change according to the value of %i
but Im having trouble with that... tried Slot@%i and it didnt work

Ideas?
Thanks in advance

#1
09/19/2001 (2:06 am)
Make %invname.Slot into an array.

ie,

for (%i=1; %i <= %invname.slots; %i++)
{
%thisSlot = %invname.Slot[%i];
}
#2
09/19/2001 (2:20 am)
It worked that way... =]

Thank you for the help