Energy Engine
Member
Hi,
I'm trying to get a script with arguments as arrays to run based on the action condition variable accessed in another list. There doesn't seem to be any errors, but I can't actually get the scripts to trigger even though the action condition shows me that it has accessed the action condition variable in that list.
Setup as follows:
Create:
Step:
I can see that ai_do becomes "move" or "mel", but the scripts above don't seem to run. Should this not work? Note that I also tried replacing the strings above with numbers just to be on the safe side, but still no triggering.
Thanks in advance!
I'm trying to get a script with arguments as arrays to run based on the action condition variable accessed in another list. There doesn't seem to be any errors, but I can't actually get the scripts to trigger even though the action condition shows me that it has accessed the action condition variable in that list.
Setup as follows:
Create:
Code:
big_list=ds_list_create(); //action condition list
list_a=ds_list_create(); //list containing script/array
list_b=ds_list_create();
arr_entry[0] = scr_debug_msg;
arr_entry[1] = ["A1","A2","A3"];
arr_entry2[0] = scr_debug_msg;
arr_entry2[1] = ["B1","B2","B3"];
ds_list_add(list_a,
arr_entry,
);
ds_list_add(list_b,
arr_entry2,
);
ds_list_add(big_list,
"move", //a items
"mel" //b items
)
Code:
if keyboard_check_pressed(220)
{
ai_do=ds_list_find_value(big_list,0) //position adjusted thru shuffle
}
if ai_do=="move"
{
var script_arr = list_a[| 0];
script_execute(script_arr[0],script_arr[1]);
}
else if ai_do=="mel"
{
var script_arr = list_b[| 0];
script_execute(script_arr[0],script_arr[1]);
}
Thanks in advance!