C
chamo55
Guest
Hello , i have a problem it sometimes works and sometimes doesnt work.How can i fix it?
create
Alarm 0
step
press A-key (when press A,obj_dot and obj_target destroy himself
Code:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Alarm Event for alarm 0
for object obj_Merkez:
Variable obj_Dot.i(100002, -2147483648) not set before reading it.
at gml_Object_obj_Merkez_ObjAlarm0_1 (line 8) - other.dotsA[i] = random(360);
############################################################################################
create
Code:
alarm[0] = 30*2;
for(i=0;i<100;i++)dots[i] = 0;
for(i=0;i<100;i++)dotsA[i] = 0;
targetA = 0;
DotSayi = 0;
target=0;
X =x;
Y =y;
Code:
DotSayi = global.dot;
random_set_seed(current_second);
for(i=0;i<DotSayi;i++){
dotsA[i] = random(360);
dots[i] = instance_create(x+225*cos(dotsA[i]),y+255*sin(dotsA[i]),obj_Dot);
with(dots[i]){
while(place_meeting(x, y, obj_Dot)){
other.dotsA[i] = random(360);
x = other.x+225*cos(other.dotsA[i]);
y = other.y+255*sin(other.dotsA[i]);
}
}
}
targetA = random(360);
target = instance_create(x+225*cos(targetA),y+255*sin(targetA),obj_Target);
with(target){
while(place_meeting(x,y, obj_Dot)){
other.targetA = random(360);
x = other.x+225*cos(other.targetA);
y = other.y+255*sin(other.targetA);
}
}
Code:
if(target){
targetA+=.1;
with(target){
x = other.x+225*cos(other.targetA);
y = other.y+255*sin(other.targetA);
}
}
Code:
alarm[0]=10;
Last edited by a moderator: