Legacy GM Can you unstring()?

Is it possible to unstring a string variable? I am making a list of 3D array variables. For example:

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)}
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.
 

dannyjenn

Member
Just pointing out, GameMaker doesn't have 3D arrays.

But as for your question, if I understand what you're asking, what you want is global_variable_set().
edit - Oh, didn't see that you're using GMS1.4, so what I said won't work.
 
Top