here are my codes so far
obj_patient1
create
timeWaited = 0; severityOfInjury = irandom_range(1, 10); priority = timeWaited * (severityOfInjury / 3); alarm[10] = room_speed;
alarm
timeWaited += 0; priority = timeWaited * (severityOfInjury / 3); alarm[10] = room_speed;
step
var xx,yy,xxx,yyy;
if instance_exists(obj_wait)
{
xxx=64;
yyy=336;
xx=floor(xxx+10);
yy=floor(yyy+10);
}
obj_doc
step
if (instance_exists(obj_patient1))
{
var nextPatient, highestNeed;
nextPatient = noone;
highestNeed = 0;
with (obj_patient1)
{
if (highestNeed > other.highestNeed)
{
other.nextPatient = id;
other.highestNeed = highestNeed;
}
}
nextPatient.selected = true; // Or whatever you're way of selecting them is :)
}











