I tried searching the forums, but I don't know what this is called. I will give an example of what I am trying to do.
I have set a variable called p10state, and p11state, all the way up to p1000state. The p stands for platform by the way, it dictates the type of platform.
I want to check every one of these states, and if it has a value of 1, to do something different to 2 or 0, they all have different collision and firing behaviours.
I construct the variable in the FOR like this:
for collisionobj=10 to 1000
if "p"+str$(collisionobj)+"state"="1"
print "obj p"+str$(collisionobj)+" is state 1"
endif
next collisionobj
This doesn't work. It constructs the variable name, but how to I check for a variable of that name?
I hope you understand.
Please help!