• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

my dialog choices are the same

case 2: NewTextBox("You Gave Response B! Any Further response?",1,["3:Yes!","0:No."]);break; the no part over ride the yes part so i get two NO,
function NewTextBox() {

var _obj;

if (instance_exists(oText)) _obj = oTextQueued; else _obj = oText;

with (instance_create_layer(0,0,"Instances",_obj))

{

message = argument[0];

if (instance_exists(other)) originInstance = other.id; else originInstance = noone;
if (argument_count > 1) background = argument[1]; else background = 1;
if (argument_count > 2)
{
global.responses = argument[2];

for (var i = 0; i < array_length (global.responses); i++)
{
var _markerPosition = string_pos (":",global.responses[i]);
responseScripts[i] = string_copy (global.responses[i],1,_markerPosition -1);
responseScripts[i] = real (responseScripts[i]);
global.responses[i] = string_delete(global.responses[i],1,_markerPosition);
breakpoint = 10;
}


}
else
{
global.responses =[-1];
responseScripts =[-1];
}



with (obj_player)

{

if (state != PlayerStateLocked)

{

lastState = state;

state = PlayerStateLocked;

}

}

}
}




function script_execute_array(){

scr = argument0;
args = argument1;

switch (array_length(args)){

case 1: return script_execute(scr, args[0]);

case 2: return script_execute(scr, args[0], args[1]);

case 3: return script_execute(scr, args[0], args[1], args[2]);

case 4: return script_execute(scr, args[0], args[1], args[2], args[3]);

case 5: return script_execute(scr, args[0], args[1], args[2], args[3], args[4]);

case 6: return script_execute(scr, args[0], args[1], args[2], args[3], args[4], args[5]);

case 7: return script_execute(scr, args[0], args[1], args[2], args[3], args[4], args[5], args[6]);

case 8: return script_execute(scr, args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7]);

default: show_error("script_execute_array: argument count not supported!",false);

}

}
 
I get both as response B. and on my NPC i have ["Hello there!", 1, ["1:Response A", "2:Response B"]] on entityactivate arg, on its varibal.
i am very new to this, so this is the best i can explain it
 
Top