F
feminist52
Guest
Is it possible to unstring a string variable? I am making a list of 3D array variables. For example:
The problem is if I use sprite_assign(File[level,0,stuff], t_spr), the id will go to File[level,0,stuff], and not into the variable's string. I could load them one by one, but the problem is that the code from the array list is only a fraction of the whole code including all the levels. btw the global variables stored in the array variables are blank and they are suppose to be filled with the id's of sprites/backgrounds.
Code:
///array list
MaxStuff[room_Russia1]=4 //number of files to load
//type of asset
File[room_Russia1,-1,1]="bg"
File[room_Russia1,-1,2]="bg"
File[room_Russia1,-1,3]="bg"
File[room_Russia1,-1,4]="bg"
//name of variable
File[room_Russia1,0,1]="global.LOAD_bg_Russia1_1"
File[room_Russia1,0,2]="global.LOAD_bg_Russia1_2"
File[room_Russia1,0,3]="global.LOAD_bg_Russia1_3"
File[room_Russia1,0,4]="global.LOAD_bg_Russia1_final"
//name of file in Included Files
File[room_Russia1,1,1]="image.jpg"
File[room_Russia1,1,2]="image2.jpg"
File[room_Russia1,1,3]="image3.jpg"
File[room_Russia1,1,4]="imagefinal.jpg"
///loading code
level=room
stuff=0
repeat MaxStuff[level]
{
stuff+=1
File[room_Russia1,stuff]
prefix=File[level,-1,1]
if prefix="spr"
{var t_spr = sprite_add(File[level,1,stuff], 0, 0, 0, 0, 0)
sprite_assign(File[level,0,stuff], t_spr)}
if prefix="bg"
{var t_spr = background_add(File[level,1,stuff], 0, 0)
background_assign(File[level,0,stuff], t_spr)}